projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8790710
)
thermal: Use kobj_to_dev() instead of container_of()
author
Tian Tao
<tiantao6@hisilicon.com>
Wed, 19 Aug 2020 01:14:31 +0000
(09:14 +0800)
committer
Daniel Lezcano
<daniel.lezcano@linaro.org>
Mon, 12 Oct 2020 10:08:35 +0000
(12:08 +0200)
Use kobj_to_dev() instead of container_of()
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link:
https://lore.kernel.org/r/1597799671-11530-1-git-send-email-tiantao6@hisilicon.com
drivers/thermal/thermal_sysfs.c
patch
|
blob
|
history
diff --git
a/drivers/thermal/thermal_sysfs.c
b/drivers/thermal/thermal_sysfs.c
index 8c231219e15dd088699ce6fb2c1a113db1351f9a..a6f371fc9af27378cbe64aa7295b935ad985aed2 100644
(file)
--- a/
drivers/thermal/thermal_sysfs.c
+++ b/
drivers/thermal/thermal_sysfs.c
@@
-448,7
+448,7
@@
static umode_t thermal_zone_passive_is_visible(struct kobject *kobj,
struct attribute *attr,
int attrno)
{
- struct device *dev =
container_of(kobj, struct device,
kobj);
+ struct device *dev =
kobj_to_dev(
kobj);
struct thermal_zone_device *tz;
enum thermal_trip_type trip_type;
int count, passive = 0;