diff mbox series

i2c: avoid confusing naming in header

Message ID 20200525120504.23338-1-wsa@kernel.org
State Accepted
Headers show
Series i2c: avoid confusing naming in header | expand

Commit Message

Wolfram Sang May 25, 2020, 12:05 p.m. UTC
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>
---

Tested by booting a Renesas Lager board; no regressions discovered.

 include/linux/i2c.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Wolfram Sang May 28, 2020, 4:08 p.m. UTC | #1
On Mon, May 25, 2020 at 02:05:04PM +0200, Wolfram Sang wrote:
> 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>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 49d29054e657..c10617bb980a 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -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 */