mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
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>
This commit is contained in:
parent
2a0aa0fa39
commit
a72acc56f3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user