lkml.org 
[lkml]   [2008]   [Jun]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSun, 22 Jun 2008 17:26:10 +0200
FromRene Herman <>
SubjectRe: [lm-sensors] [REGRESSION, ABI] Re: LMSENSORS: 2.6.26-rc, enabling ACPI Termal Zone support costs sensors
On 22-06-08 16:29, Hans de Goede wrote:

> Rene Herman wrote:
>> This is an ABI breakage issue and an unfortunate one at that:
>>
> 
> No it is not, in 2.6.26rcX, the acpi thermalzones have grown a hwmon 
> interface, that is they register a hwmon device so that "sensors" and

[ ... ]

Now what? Yes it is. 2.6.25.7 works and 2.6.26-rcX with the same config 
options and the same userspace does not. What do you think ABI breakage 
is? It's not relevant that you feel/know that the lm_sensors userspace 
has a bug; it used to work, it's widely installed and the new kernel 
side code however conceptually correct breaks those setups.

>> But if not, .26 is around the corner and requiring libsensors-3.0 must 
>> really not be.
>>
> I agree that requiring libsensors-3.0.2 for this is not a good solution, 
> but I don't want to be crippling the kernel for what I believe is a bug 
> in 2.10.x either.

You don't need to. As said, just make it optional. The attached seems to 
be working for me.

Rene.
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 4b62852..f6a7652 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -12,3 +12,12 @@ menuconfig THERMAL
 	  cooling devices.
 	  All platforms with ACPI thermal support can use this driver.
 	  If you want this support, you should say Y or M here.
+
+config THERMAL_HWMON
+	bool "Hardware monitoring support"
+	depends on HWMON=y || HWMON=THERMAL
+	help
+	  The generic thermal sysfs driver's hardware monitoring support
+	  requires a 3.0 or later lm_sensors userspace.
+
+	  Say Y if you have a new enough lm_sensors userspace.
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 6098787..fe07462 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -295,8 +295,8 @@ thermal_cooling_device_trip_point_show(struct device *dev,
 
 /* Device management */
 
-#if defined(CONFIG_HWMON) ||	\
-	(defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
+#if defined(CONFIG_THERMAL_HWMON)
+
 /* hwmon sys I/F */
 #include <linux/hwmon.h>
 static LIST_HEAD(thermal_hwmon_list);
\
 
 \ /
  Last update: 2008-06-22 17:27    [from the cache]
©2003-2008