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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}