From: Eduardo Valentin <eduardo.valentin@ti.com>
To: linux-pm@vger.kernel.org, rui.zhang@intel.com
Cc: linux-kernel@vger.kernel.org, Eduardo Valentin <eduardo.valentin@ti.com>
Subject: [PATCH 2/5] drivers: thermal: parent virtual hwmon with thermal zone
Date: Fri, 23 Aug 2013 18:03:13 -0400 [thread overview]
Message-ID: <1377295396-17289-3-git-send-email-eduardo.valentin@ti.com> (raw)
In-Reply-To: <1377295396-17289-1-git-send-email-eduardo.valentin@ti.com>
When creating virtual hwmon devices based out of thermal
zone devices, the virtual devices won't have parents.
This patch changes the code so that the parent of virtual
hwmon devices is the thermal zone device that they are
based of.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
drivers/thermal/thermal_hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index fdb0719..eeef0e2 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -159,7 +159,7 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
INIT_LIST_HEAD(&hwmon->tz_list);
strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
- hwmon->device = hwmon_device_register(NULL);
+ hwmon->device = hwmon_device_register(&tz->device);
if (IS_ERR(hwmon->device)) {
result = PTR_ERR(hwmon->device);
goto free_mem;
--
1.8.2.1.342.gfa7285d
next prev parent reply other threads:[~2013-08-23 22:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 22:03 [PATCH 0/5] drivers: thermal: several fixes Eduardo Valentin
2013-08-23 22:03 ` [PATCH 1/5] thermal: hwmon: move hwmon support to single file Eduardo Valentin
2013-08-23 22:03 ` Eduardo Valentin [this message]
2013-08-23 22:03 ` [PATCH 3/5] drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional Eduardo Valentin
2013-08-23 23:08 ` Rafael J. Wysocki
2013-08-27 18:26 ` Eduardo Valentin
2013-08-27 21:17 ` Rafael J. Wysocki
2013-08-28 0:13 ` Zhang Rui
2013-08-28 13:15 ` Eduardo Valentin
2013-08-29 20:12 ` [PATCHv2 " Eduardo Valentin
2013-09-02 14:09 ` Eduardo Valentin
2013-08-23 22:03 ` [PATCH 4/5] thermal: thermal_core: allow binding with limits on bind_params Eduardo Valentin
2013-08-23 22:03 ` [PATCH 5/5] drivers: thermal: add check when unregistering cpu cooling Eduardo Valentin
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=1377295396-17289-3-git-send-email-eduardo.valentin@ti.com \
--to=eduardo.valentin@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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).