linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: avoid confusing naming in header
@ 2020-05-25 12:05 Wolfram Sang
  2020-05-28 16:08 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2020-05-25 12:05 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang

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(-)

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 */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: avoid confusing naming in header
  2020-05-25 12:05 [PATCH] i2c: avoid confusing naming in header Wolfram Sang
@ 2020-05-28 16:08 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2020-05-28 16:08 UTC (permalink / raw)
  To: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

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!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-28 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 12:05 [PATCH] i2c: avoid confusing naming in header Wolfram Sang
2020-05-28 16:08 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).