mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
i2c: Fix sparse warning in i2c.h
Kill a sparse warning by un-nesting two container_of() calls. Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
d64f73be1b
commit
d75d53cd57
1 changed files with 2 additions and 1 deletions
|
@ -185,7 +185,8 @@ struct i2c_client {
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue