diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2020-09-15 09:38:18 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-09-21 11:45:43 +0200 |
commit | b1d4dc15b2f430a4f541ab6c91e63a71cf230b7d (patch) | |
tree | 9dc4c6720083a365f73dd436f32ea2a6f9494d06 /include/linux/i2c.h | |
parent | c4651f11d09ac975b6593653edbf74b892523a8f (diff) |
i2c: Switch to using the new API kobj_to_dev()
Switch to using the new API kobj_to_dev().
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index fc55ea41d323..56622658b215 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); } |