OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a0aa0f
)
power-supply: use kobj_to_dev()
author
Jian Dong
<dongjian@yulong.com>
Wed, 20 Jan 2021 01:47:12 +0000
(09:47 +0800)
committer
Sebastian Reichel
<sre@kernel.org>
Thu, 28 Jan 2021 00:31:42 +0000
(
01:31
+0100)
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>
drivers/power/supply/ds2760_battery.c
patch
|
blob
|
history
diff --git
a/drivers/power/supply/ds2760_battery.c
b/drivers/power/supply/ds2760_battery.c
index
695bb67
..
5f50da5
100644
(file)
--- a/
drivers/power/supply/ds2760_battery.c
+++ b/
drivers/power/supply/ds2760_battery.c
@@
-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);
}