summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-08-19 09:14:31 +0800
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-10-12 12:08:35 +0200
commit6ad1c515b8fb572b825d31e27b902f4ae9b0aa38 (patch)
treedbc043bb050ec629ec76d38aa39656e07a8e6dba /drivers/thermal
parent8790710a0f07d7d044632da7737b0563c6cfa896 (diff)
thermal: Use kobj_to_dev() instead of container_of()
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
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 8c231219e15d..a6f371fc9af2 100644
--- 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;