thermal: add the support for building the generic thermal as a module
authorZhang Rui <rui.zhang@intel.com>
Mon, 21 Apr 2008 08:07:13 +0000 (16:07 +0800)
committerLen Brown <len.brown@intel.com>
Tue, 29 Apr 2008 06:44:00 +0000 (02:44 -0400)
Build the generic thermal driver as module "thermal_sys".

Make ACPI thermal, video, processor and fan SELECT the generic
thermal driver, as these drivers rely on it to build the sysfs I/F.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/Kconfig
drivers/misc/Kconfig
drivers/thermal/Kconfig
drivers/thermal/Makefile
drivers/thermal/thermal.c
include/linux/thermal.h

index b4f5e85428294eed21bb8f342af5a7a7c3fac87b..c52fca833268c7f1eaf53c091fa2f41e49d5d4a0 100644 (file)
@@ -140,6 +140,7 @@ config ACPI_VIDEO
        tristate "Video"
        depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL
        depends on INPUT
+       select THERMAL
        help
          This driver implement the ACPI Extensions For Display Adapters
          for integrated graphics devices on motherboard, as specified in
@@ -151,6 +152,7 @@ config ACPI_VIDEO
 
 config ACPI_FAN
        tristate "Fan"
+       select THERMAL
        default y
        help
          This driver adds support for ACPI fan devices, allowing user-mode 
@@ -172,6 +174,7 @@ config ACPI_BAY
 
 config ACPI_PROCESSOR
        tristate "Processor"
+       select THERMAL
        default y
        help
          This driver installs ACPI as the idle handler for Linux, and uses
index 297a48f8544679dda2af4bd435cb32feff65b661..08f35d76dcd9003960c395f59e6aafe5f919b55e 100644 (file)
@@ -344,6 +344,7 @@ config ATMEL_SSC
 config INTEL_MENLOW
        tristate "Thermal Management driver for Intel menlow platform"
        depends on ACPI_THERMAL
+       select THERMAL
        depends on X86
        ---help---
          ACPI thermal management enhancement driver on
index 17e71d56f31ef777af16d6745cfa5394c7c85df1..4b628526df097562a94004a653a9ba16eed9dd18 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 menuconfig THERMAL
-       bool "Generic Thermal sysfs driver"
+       tristate "Generic Thermal sysfs driver"
        help
          Generic Thermal Sysfs driver offers a generic mechanism for
          thermal management. Usually it's made up of one or more thermal
@@ -11,4 +11,4 @@ menuconfig THERMAL
          Each thermal zone contains its own temperature, trip points,
          cooling devices.
          All platforms with ACPI thermal support can use this driver.
-         If you want this support, you should say Y here.
+         If you want this support, you should say Y or M here.
index 8ef1232de37664b2bac7ffa5fc292ea635083969..02b64517be8fb38a8b1be77a448fc2e73941d46a 100644 (file)
@@ -2,4 +2,5 @@
 # Makefile for sensor chip drivers.
 #
 
-obj-$(CONFIG_THERMAL)          += thermal.o
+thermal_sys-objs       += thermal.o
+obj-$(CONFIG_THERMAL)          += thermal_sys.o
index 7f79bbf652d7483c1a11f1b793973f0eddf345f4..cf56af4b7e021390ae6d4a829380a4e549a60467 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/thermal.h>
 #include <linux/spinlock.h>
 
-MODULE_AUTHOR("Zhang Rui")
+MODULE_AUTHOR("Zhang Rui");
 MODULE_DESCRIPTION("Generic thermal management sysfs support");
 MODULE_LICENSE("GPL");
 
index 90c1c191ea694707679e067209c24b6616721f54..3ff680b44e812bb4d3293e08ebffc1f43fa0d06a 100644 (file)
@@ -88,24 +88,10 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
                                     struct thermal_cooling_device *);
 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
                                       struct thermal_cooling_device *);
-
-#ifdef CONFIG_THERMAL
 struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
                                                               struct
                                                               thermal_cooling_device_ops
                                                               *);
 void thermal_cooling_device_unregister(struct thermal_cooling_device *);
-#else
-static inline struct thermal_cooling_device
-*thermal_cooling_device_register(char *c, void *v,
-                                struct thermal_cooling_device_ops *t)
-{
-       return NULL;
-}
-static inline
-    void thermal_cooling_device_unregister(struct thermal_cooling_device *t)
-{
-};
-#endif
 
 #endif /* __THERMAL_H__ */