diff options
author | Eduardo Valentin <eduardo.valentin@ti.com> | 2014-02-07 02:44:04 -0800 |
---|---|---|
committer | Diwakar Tundlam <dtundlam@nvidia.com> | 2014-02-13 15:05:51 -0800 |
commit | d6d6dd43ed7862b1cf040ebd21effe28c60da228 (patch) | |
tree | f61969b93bb1bf2233f1a0c9c1e134256d26581f /drivers/thermal | |
parent | b9b356f668f27f482d80b5d0283ec680053b8668 (diff) |
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.
Change-Id: Id200409ea8ba1a8c2d59cf216d51af1769dbb6c8
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>
Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> # for the NVIDIA downstream kernel
Reviewed-on: http://git-master/r/356882
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.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 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; |