1
0
Fork 0

power-supply: use kobj_to_dev()

Use kobj_to_dev() instead of open-coding it

Signed-off-by: Jian Dong <dongjian@yulong.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
master
Jian Dong 2021-01-20 09:47:12 +08:00 committed by Sebastian Reichel
parent 2a0aa0fa39
commit a72acc56f3
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}