diff options
author | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-08-24 01:07:58 +0400 |
---|---|---|
committer | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-09-03 17:10:10 +0400 |
commit | b82715fdd4a5407f56853b24d387d484dd9c3b5b (patch) | |
tree | 1752ce1e1507fa0049a70cb63e62d3eb6fd725e1 /drivers | |
parent | 0dd88793aacd7c91b9724be7b618bb3f7c25befe (diff) | |
download | linux-b82715fdd4a5407f56853b24d387d484dd9c3b5b.tar.xz |
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')
-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 fdb07199d9c2..eeef0e2498ca 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; |