i2c: avoid confusing naming in header
authorWolfram Sang <wsa@kernel.org>
Mon, 25 May 2020 12:05:04 +0000 (14:05 +0200)
committerWolfram Sang <wsa@kernel.org>
Thu, 28 May 2020 16:07:11 +0000 (18:07 +0200)
i2c_client pointers are usually named 'client'. Use it here to get rid
of the ambiguity of 'dev->dev'.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
include/linux/i2c.h

index 49d29054e6571175eb8dce9b908785d3b657544a..c10617bb980ab9b6efd8939cbf7d2a4fead67014 100644 (file)
@@ -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 */