summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-08-23 17:07:58 -0400
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:45:19 +0900
commit1191e689061dbbce20f758692439eb4705ae9bc1 (patch)
tree10bcb133138b31c7221d91cc2326caa3cb042a2f /drivers/thermal
parent34fe70478f6c5944bbc8fdcb0768e5ed77484894 (diff)
downloadlinux-3.10-1191e689061dbbce20f758692439eb4705ae9bc1.tar.gz
linux-3.10-1191e689061dbbce20f758692439eb4705ae9bc1.tar.bz2
linux-3.10-1191e689061dbbce20f758692439eb4705ae9bc1.zip
drivers: thermal: parent virtual hwmon with thermal zone
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_hwmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index fdb07199d9c..eeef0e2498c 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;