All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: Use kobj_to_dev() instead of container_of()
@ 2020-08-19  1:14 Tian Tao
  2020-08-24 10:24 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2020-08-19  1:14 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, amit.kucheria, linux-pm; +Cc: linuxarm

Use kobj_to_dev() instead of container_of()

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/thermal/thermal_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 8c23121..a6f371f 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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] thermal: Use kobj_to_dev() instead of container_of()
  2020-08-19  1:14 [PATCH] thermal: Use kobj_to_dev() instead of container_of() Tian Tao
@ 2020-08-24 10:24 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2020-08-24 10:24 UTC (permalink / raw)
  To: Tian Tao, rui.zhang, amit.kucheria, linux-pm; +Cc: linuxarm

On 19/08/2020 03:14, Tian Tao wrote:
> Use kobj_to_dev() instead of container_of()
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-24 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19  1:14 [PATCH] thermal: Use kobj_to_dev() instead of container_of() Tian Tao
2020-08-24 10:24 ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.