diff options
author | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-07-12 08:12:28 -0400 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2007-07-12 08:12:28 -0400 |
commit | d75d53cd571c02990d56e72f615ab11e943772f9 (patch) | |
tree | 7a4e8cbece9b18829e5cb830134d717cfce38e18 | |
parent | d64f73be1b59b9556de0a8fbd4f1a003c6a45a5c (diff) |
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>
-rw-r--r-- | include/linux/i2c.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index a24e267fd189..44f2ecf47d9f 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -185,7 +185,8 @@ struct i2c_client { | |||
185 | 185 | ||
186 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) | 186 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) |
187 | { | 187 | { |
188 | return to_i2c_client(container_of(kobj, struct device, kobj)); | 188 | struct device * const dev = container_of(kobj, struct device, kobj); |
189 | return to_i2c_client(dev); | ||
189 | } | 190 | } |
190 | 191 | ||
191 | static inline void *i2c_get_clientdata (struct i2c_client *dev) | 192 | static inline void *i2c_get_clientdata (struct i2c_client *dev) |