]> Git Repo - linux.git/commitdiff
drivers: thermal: parent virtual hwmon with thermal zone
authorEduardo Valentin <[email protected]>
Fri, 23 Aug 2013 21:07:58 +0000 (17:07 -0400)
committerEduardo Valentin <[email protected]>
Tue, 3 Sep 2013 13:10:10 +0000 (09:10 -0400)
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 <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Eduardo Valentin <[email protected]>
drivers/thermal/thermal_hwmon.c

index fdb07199d9c2693b8ae91af6d626f588ed21350b..eeef0e2498caa39edc55cd3cf6345953a537f626 100644 (file)
@@ -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;
This page took 0.066547 seconds and 4 git commands to generate.