Commit b1d4dc15 authored by Tian Tao's avatar Tian Tao Committed by Wolfram Sang

i2c: Switch to using the new API kobj_to_dev()

Switch to using the new API kobj_to_dev().
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent c4651f11
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment