[PATCH] thermal: link the virtual/thermal/thermal_zoneN device for hwmon
From: Rene Herman
Date: Sun Jun 22 2008 - 17:45:04 EST
2.6.26-rc gained a hwmon interface to the ACPI Thermal Zone
driver which unfortunately breaks lm-sensors 2 userspace and
renders all other (subsequent) hwmon sensors inoperable also.
Many systems, current slackware systems among them, are still
using lm-sensors 2 and would be affected.
The problem is userspace tripping over an absent "device"
link in the ACPI Thermal Zone sysfs /sys/class/hwmon/hwmonN
directory. This just adds the virtual "thermal/thermal_zoneN"
device as a device backlink which satisfies lm-sensors again.
Tested and looks fairly obvious, but this wants comment from
a thermal_zone person, to confirm/deny that this is a proper
device pointer to use here for one.
Signed-off-by: Rene Herman <rene.herman@xxxxxxxxx>
CC: Hans de Goede <j.w.r.degoede@xxxxxx>
CC: Zhang Rui <rui.zhang@xxxxxxxxx>
CC: Mark M. Hoffman <mhoffman@xxxxxxxxxxxxx>
CC: Jean Delvare <khali@xxxxxxxxxxxx>
CC: linux-acpi@xxxxxxxxxxxxxxx
CC: lm-sensors@xxxxxxxxxxxxxx
CC; linux-kernel@xxxxxxxxxxxxxxx
---
drivers/thermal/thermal_sys.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 6098787..c21e03c 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -357,7 +357,7 @@ 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;
--
1.5.5
--------------070303080305060107030109--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/