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:
12d36c8
)
hwmon: (abx500) Switch to using the new API kobj_to_dev()
author
Tian Tao
<tiantao6@hisilicon.com>
Thu, 26 Nov 2020 02:21:20 +0000
(10:21 +0800)
committer
Guenter Roeck
<linux@roeck-us.net>
Thu, 3 Dec 2020 01:42:24 +0000
(17:42 -0800)
fixed the following coccicheck:
drivers/hwmon/abx500.c:266:60-61: WARNING opportunity for kobj_to_dev().
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Link:
https://lore.kernel.org/r/1606357280-51921-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/abx500.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/abx500.c
b/drivers/hwmon/abx500.c
index
50e67cd
..
4b96488
100644
(file)
--- a/
drivers/hwmon/abx500.c
+++ b/
drivers/hwmon/abx500.c
@@
-263,7
+263,7
@@
static ssize_t max_alarm_show(struct device *dev,
static umode_t abx500_attrs_visible(struct kobject *kobj,
struct attribute *attr, int n)
{
- struct device *dev =
container_of(kobj, struct device,
kobj);
+ struct device *dev =
kobj_to_dev(
kobj);
struct abx500_temp *data = dev_get_drvdata(dev);
if (data->ops.is_visible)