public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: "Zhang, Rui" <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>,
	linux-acpi <linux-acpi@vger.kernel.org>,
	lm-sensors <lm-sensors@lm-sensors.org>,
	Hans de Goede <j.w.r.degoede@hhs.nl>
Subject: Re: [PATCH 1/3] thermal: build generic thermal driver as a module
Date: Sun, 6 Apr 2008 11:58:47 +0200	[thread overview]
Message-ID: <20080406115847.2849532e@hyperion.delvare> (raw)
In-Reply-To: <1207123645.27304.3.camel@acpi-hp-zz.sh.intel.com>

Hi Rui,

On Wed, 02 Apr 2008 16:07:25 +0800, Zhang, Rui wrote:
> The generic thermal driver can be built as module "thermal_sys",
> which give us more flexibility both at build time and
> when bugs are reported.

I (obviously) like the idea...

> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/thermal/Kconfig   |    4 ++--
>  drivers/thermal/Makefile  |    3 ++-
>  drivers/thermal/thermal.c |    2 +-
>  3 files changed, 5 insertions(+), 4 deletions(-)
> 
> Index: linux-2.6/drivers/thermal/Kconfig
> ===================================================================
> --- linux-2.6.orig/drivers/thermal/Kconfig
> +++ linux-2.6/drivers/thermal/Kconfig
> @@ -3,7 +3,7 @@
>  #
>  
>  menuconfig THERMAL
> -	bool "Generic Thermal sysfs driver"
> +	tristate "Generic Thermal sysfs driver"

There's a build breakage currently if this is compiled as module, fix
is below:

---
 include/linux/thermal.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.25-rc8.orig/include/linux/thermal.h	2008-02-11 09:49:10.000000000 +0100
+++ linux-2.6.25-rc8/include/linux/thermal.h	2008-04-06 09:40:06.000000000 +0200
@@ -89,7 +89,7 @@ int thermal_zone_bind_cooling_device(str
 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
 				       struct thermal_cooling_device *);
 
-#ifdef	CONFIG_THERMAL
+#if defined CONFIG_THERMAL || defined CONFIG_THERMAL_MODULE
 struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
 							       struct
 							       thermal_cooling_device_ops


>  	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: linux-2.6/drivers/thermal/thermal.c
> ===================================================================
> --- linux-2.6.orig/drivers/thermal/thermal.c
> +++ linux-2.6/drivers/thermal/thermal.c
> @@ -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: linux-2.6/drivers/thermal/Makefile
> ===================================================================
> --- linux-2.6.orig/drivers/thermal/Makefile
> +++ linux-2.6/drivers/thermal/Makefile
> @@ -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
> 
> 

I'd rather rename the source file to thermal_sys.c, so that developers
can search for the module name and find it. It's also more efficient.
Git handles renaming just fine, so I guess Len can take care of this.

-- 
Jean Delvare

      reply	other threads:[~2008-04-06  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-02  8:07 [PATCH 1/3] thermal: build generic thermal driver as a module Zhang, Rui
2008-04-06  9:58 ` Jean Delvare [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080406115847.2849532e@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=j.w.r.degoede@hhs.nl \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox