Commit 6ad1c515 authored by Tian Tao's avatar Tian Tao Committed by Daniel Lezcano

thermal: Use kobj_to_dev() instead of container_of()

Use kobj_to_dev() instead of container_of()
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1597799671-11530-1-git-send-email-tiantao6@hisilicon.com
parent 8790710a
...@@ -448,7 +448,7 @@ static umode_t thermal_zone_passive_is_visible(struct kobject *kobj, ...@@ -448,7 +448,7 @@ static umode_t thermal_zone_passive_is_visible(struct kobject *kobj,
struct attribute *attr, struct attribute *attr,
int attrno) int attrno)
{ {
struct device *dev = container_of(kobj, struct device, kobj); struct device *dev = kobj_to_dev(kobj);
struct thermal_zone_device *tz; struct thermal_zone_device *tz;
enum thermal_trip_type trip_type; enum thermal_trip_type trip_type;
int count, passive = 0; int count, passive = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment