lkml.org 
[lkml]   [2008]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [lm-sensors] [REGRESSION, ABI] Re: LMSENSORS: 2.6.26-rc, enabling ACPI Termal Zone support costs sensors
    On 22-06-08 20:25, Rene Herman wrote:

    > Another way to solve it _could_ be to just make up a device link if
    > something generic is available so that sensors doesn't trip over it
    > in the first place but I don't know if that's a good option. You
    > might.

    This also works for me and, if correct, is ofcourse better than the
    CONFIG option. Wants a comment from the thermal_zone side (for which
    Zhang Rui seems the correct CC?) though.

    Rene
    From b51a5f4105f6b5ff52a2819a96dabe2ca3116128 Mon Sep 17 00:00:00 2001
    From: Rene Herman <rene.herman@gmail.com>
    Date: Sun, 22 Jun 2008 23:45:04 +0200
    Subject: [PATCH] thermal: link the virtual/thermal/thermal_zoneN device for hwmon

    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@gmail.com>
    CC: Hans de Goede <j.w.r.degoede@hhs.nl>
    CC: Zhang Rui <rui.zhang@intel.com>
    CC: Mark M. Hoffman <mhoffman@lightlink.com>
    CC: Jean Delvare <khali@linux-fr.org>
    CC: linux-acpi@vger.kernel.org
    CC: lm-sensors@lm-sensors.org
    CC; linux-kernel@vger.kernal.org
    ---
    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
    \
     
     \ /
      Last update: 2008-06-23 00:01    [W:0.048 / U:58.808 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site