Skip to content

Commit

Permalink
i2c: avoid confusing naming in header
Browse files Browse the repository at this point in the history
i2c_client pointers are usually named 'client'. Use it here to get rid
of the ambiguity of 'dev->dev'.

Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
wsakernel committed May 28, 2020
1 parent 468ed57 commit 7df915e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/linux/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,14 @@ static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
return to_i2c_client(dev);
}

static inline void *i2c_get_clientdata(const struct i2c_client *dev)
static inline void *i2c_get_clientdata(const struct i2c_client *client)
{
return dev_get_drvdata(&dev->dev);
return dev_get_drvdata(&client->dev);
}

static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
static inline void i2c_set_clientdata(struct i2c_client *client, void *data)
{
dev_set_drvdata(&dev->dev, data);
dev_set_drvdata(&client->dev, data);
}

/* I2C slave support */
Expand Down

0 comments on commit 7df915e

Please sign in to comment.