Skip to content

Commit a72acc5

Browse files
Jian Dongsre
authored andcommitted
power-supply: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it Signed-off-by: Jian Dong <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 2a0aa0f commit a72acc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/power/supply/ds2760_battery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj,
198198
struct bin_attribute *bin_attr, char *buf,
199199
loff_t off, size_t count)
200200
{
201-
struct device *dev = container_of(kobj, struct device, kobj);
201+
struct device *dev = kobj_to_dev(kobj);
202202
return w1_ds2760_read(dev, buf, off, count);
203203
}
204204

0 commit comments

Comments
 (0)