All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: Switch to using the new API kobj_to_dev()
@ 2020-09-15  1:38 Tian Tao
  2020-09-18 21:09 ` wsa
  2020-09-21  9:14 ` Wolfram Sang
  0 siblings, 2 replies; 5+ messages in thread
From: Tian Tao @ 2020-09-15  1:38 UTC (permalink / raw)
  To: wsa, linux-i2c, linux-kernel; +Cc: linuxarm

Switch to using the new API kobj_to_dev().

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 include/linux/i2c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index fc55ea4..5662265 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -344,7 +344,7 @@ const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id,
 
 static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
 {
-	struct device * const dev = container_of(kobj, struct device, kobj);
+	struct device * const dev = kobj_to_dev(kobj);
 	return to_i2c_client(dev);
 }
 
-- 
2.7.4


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

end of thread, other threads:[~2020-09-21  9:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  1:38 [PATCH] i2c: Switch to using the new API kobj_to_dev() Tian Tao
2020-09-18 21:09 ` wsa
2020-09-19  1:01   ` tiantao (H)
2020-09-19  6:32     ` wsa
2020-09-21  9:14 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.