summaryrefslogtreecommitdiff
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-09-15 04:38:18 +0300
committerWolfram Sang <wsa@kernel.org>2020-09-21 12:45:43 +0300
commitb1d4dc15b2f430a4f541ab6c91e63a71cf230b7d (patch)
tree9dc4c6720083a365f73dd436f32ea2a6f9494d06 /include/linux/i2c.h
parentc4651f11d09ac975b6593653edbf74b892523a8f (diff)
downloadlinux-b1d4dc15b2f430a4f541ab6c91e63a71cf230b7d.tar.xz
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.h2
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);
}