提交 d75d53cd 编写于 作者: M Mark M. Hoffman 提交者: Jean Delvare

i2c: Fix sparse warning in i2c.h

Kill a sparse warning by un-nesting two container_of() calls.
Signed-off-by: NMark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 d64f73be
...@@ -185,7 +185,8 @@ struct i2c_client { ...@@ -185,7 +185,8 @@ struct i2c_client {
static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
{ {
return to_i2c_client(container_of(kobj, struct device, kobj)); struct device * const dev = container_of(kobj, struct device, kobj);
return to_i2c_client(dev);
} }
static inline void *i2c_get_clientdata (struct i2c_client *dev) static inline void *i2c_get_clientdata (struct i2c_client *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册