linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: eduardo.valentin-l0cyMroinI0@public.gmane.org,
	rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	durgadoss.r-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH v2 2/2] thermal: use device node to get thermal zone
Date: Thu, 9 Jan 2014 18:37:59 +0800	[thread overview]
Message-ID: <1389263879-10483-3-git-send-email-wni@nvidia.com> (raw)
In-Reply-To: <1389263879-10483-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

The thermal fw support same name for different thermal zones.
If use name to get the thermal zone, sometimes it can't get
the unique thermal zone. And the of-thermal driver is used
to parse DT for thermal fw, so it's better to use device node
to lookup and get thermal zone.

Change-Id: I6c690902a9535915b2f49f9921779fbcd5ecd88c
Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/thermal/of-thermal.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index 53f2d3a..97c12cf 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -330,7 +330,7 @@ thermal_zone_of_add_sensor(struct device_node *zone,
 	struct thermal_zone_device *tzd;
 	struct __thermal_zone *tz;
 
-	tzd = thermal_zone_get_zone_by_name(zone->name);
+	tzd = thermal_zone_get_zone_by_node(zone);
 	if (IS_ERR(tzd))
 		return ERR_PTR(-EPROBE_DEFER);
 
@@ -839,7 +839,7 @@ void of_thermal_destroy_zones(void)
 	for_each_child_of_node(np, child) {
 		struct thermal_zone_device *zone;
 
-		zone = thermal_zone_get_zone_by_name(child->name);
+		zone = thermal_zone_get_zone_by_node(child);
 		if (IS_ERR(zone))
 			continue;
 
-- 
1.7.9.5

      parent reply	other threads:[~2014-01-09 10:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 10:37 [PATCH v2 0/2] Intruduce thermal_zone_get_zone_by_node Wei Ni
2014-01-09 10:37 ` [PATCH v2 1/2] thermal: introduce thermal_zone_get_zone_by_node helper function Wei Ni
     [not found]   ` <1389263879-10483-2-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-01-13 16:05     ` Eduardo Valentin
     [not found]       ` <52D40EC6.6050509-l0cyMroinI0@public.gmane.org>
2014-01-14 10:35         ` Wei Ni
     [not found]           ` <52D512F1.1090008-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-01-14 15:30             ` Eduardo Valentin
     [not found]               ` <52D5582F.5000807-l0cyMroinI0@public.gmane.org>
2014-01-15 11:52                 ` Wei Ni
     [not found]                   ` <52D6766D.6080100-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-01-15 14:09                     ` Eduardo Valentin
     [not found]                       ` <52D6967C.9010305-l0cyMroinI0@public.gmane.org>
2014-01-17  7:38                         ` Wei Ni
     [not found] ` <1389263879-10483-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-01-09 10:37   ` Wei Ni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389263879-10483-3-git-send-email-wni@nvidia.com \
    --to=wni-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=durgadoss.r-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=eduardo.valentin-l0cyMroinI0@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).