Commit a72acc56 authored by Jian Dong's avatar Jian Dong Committed by Sebastian Reichel

power-supply: use kobj_to_dev()

Use kobj_to_dev() instead of open-coding it
Signed-off-by: default avatarJian Dong <dongjian@yulong.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 2a0aa0fa
......@@ -198,7 +198,7 @@ static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf,
loff_t off, size_t count)
{
struct device *dev = container_of(kobj, struct device, kobj);
struct device *dev = kobj_to_dev(kobj);
return w1_ds2760_read(dev, buf, off, count);
}
......
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