diff options
author | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-08-23 17:07:58 -0400 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-03-20 17:41:59 +0900 |
commit | 60c10a0463337e5cac718e9c1af7b850501f058a (patch) | |
tree | 94dc69bdba342fa9d790a5a625bf9eaf4bbf5b50 /drivers/thermal | |
parent | 51e0e721b29be9c01d9cd4c655a4c5caa4ccc10d (diff) | |
download | linux-3.10-60c10a0463337e5cac718e9c1af7b850501f058a.tar.gz linux-3.10-60c10a0463337e5cac718e9c1af7b850501f058a.tar.bz2 linux-3.10-60c10a0463337e5cac718e9c1af7b850501f058a.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.c | 2 |
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; |