public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Switch therm_adt746x to new module_param
@ 2004-11-17 18:34 Colin Leroy
  2004-11-17 18:43 ` Randy.Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Leroy @ 2004-11-17 18:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Hi Andrew,

this patch replaces MODULE_PARM to module_param for adt746x.

Signed-off-by: Colin Leroy <colin@colino.net>
--- a/drivers/macintosh/therm_adt746x.c	2004-11-17 19:26:16.908413504 +0100
+++ b/drivers/macintosh/therm_adt746x.c	2004-11-17 19:28:01.193559752 +0100
@@ -23,6 +23,8 @@
 #include <linux/smp_lock.h>
 #include <linux/wait.h>
 #include <linux/suspend.h>
+#include <linux/kthread.h>
+#include <linux/moduleparam.h>
 
 #include <asm/prom.h>
 #include <asm/machdep.h>
@@ -30,7 +32,6 @@
 #include <asm/system.h>
 #include <asm/sections.h>
 #include <asm/of_device.h>
-#include <linux/kthread.h>
 
 #undef DEBUG
 
@@ -56,11 +57,11 @@
 		   "Powerbook G4 Alu");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(limit_adjust,"i");
+module_param(limit_adjust, int, 0);
 MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) "
 		 "by N degrees.");
 
-MODULE_PARM(fan_speed,"i");
+module_param(fan_speed, int, 64);
 MODULE_PARM_DESC(fan_speed,"Specify starting fan speed (0-255) "
 		 "(default 64)");
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Switch therm_adt746x to new module_param
  2004-11-17 18:34 [PATCH] Switch therm_adt746x to new module_param Colin Leroy
@ 2004-11-17 18:43 ` Randy.Dunlap
  2004-11-17 19:51   ` Colin Leroy
  0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2004-11-17 18:43 UTC (permalink / raw)
  To: Colin Leroy; +Cc: Andrew Morton, linux-kernel

Colin Leroy wrote:
> Hi Andrew,
> 
> this patch replaces MODULE_PARM to module_param for adt746x.
> 
> Signed-off-by: Colin Leroy <colin@colino.net>
> --- a/drivers/macintosh/therm_adt746x.c	2004-11-17 19:26:16.908413504 +0100
> +++ b/drivers/macintosh/therm_adt746x.c	2004-11-17 19:28:01.193559752 +0100

> @@ -56,11 +57,11 @@
>  		   "Powerbook G4 Alu");
>  MODULE_LICENSE("GPL");
>  
> -MODULE_PARM(limit_adjust,"i");
> +module_param(limit_adjust, int, 0);
>  MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) "
>  		 "by N degrees.");
>  
> -MODULE_PARM(fan_speed,"i");
> +module_param(fan_speed, int, 64);

The last parameter here (64) is not an init. value nor a
suggested parameter value.
It's a permission for an entry in /sys (sysfs).
0 means not visible there.
If it should be visible there, use something like
0444 (read-only by anyone) or 0644 (read-write by root).

>  MODULE_PARM_DESC(fan_speed,"Specify starting fan speed (0-255) "
>  		 "(default 64)");



-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Switch therm_adt746x to new module_param
  2004-11-17 18:43 ` Randy.Dunlap
@ 2004-11-17 19:51   ` Colin Leroy
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Leroy @ 2004-11-17 19:51 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Andrew Morton, linux-kernel

On 17 Nov 2004 at 10h11, Randy.Dunlap wrote:

Hi, 

> The last parameter here (64) is not an init. value nor a
> suggested parameter value.
> It's a permission for an entry in /sys (sysfs).
> 0 means not visible there.
> If it should be visible there, use something like
> 0444 (read-only by anyone) or 0644 (read-write by root).

Uh, thank you :)
Updated patch follows:

Signed-off-by: Colin Leroy <colin@colino.net>
--- a/drivers/macintosh/therm_adt746x.c	2004-11-17 19:26:16.908413504 +0100
+++ b/drivers/macintosh/therm_adt746x.c	2004-11-17 19:28:01.193559752 +0100
@@ -23,6 +23,8 @@
 #include <linux/smp_lock.h>
 #include <linux/wait.h>
 #include <linux/suspend.h>
+#include <linux/kthread.h>
+#include <linux/moduleparam.h>
 
 #include <asm/prom.h>
 #include <asm/machdep.h>
@@ -30,7 +32,6 @@
 #include <asm/system.h>
 #include <asm/sections.h>
 #include <asm/of_device.h>
-#include <linux/kthread.h>
 
 #undef DEBUG
 
@@ -56,11 +57,11 @@
 		   "Powerbook G4 Alu");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(limit_adjust,"i");
+module_param(limit_adjust, int, 0644);
 MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) "
 		 "by N degrees.");
 
-MODULE_PARM(fan_speed,"i");
+module_param(fan_speed, int, 0644);
 MODULE_PARM_DESC(fan_speed,"Specify starting fan speed (0-255) "
 		 "(default 64)");
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-17 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17 18:34 [PATCH] Switch therm_adt746x to new module_param Colin Leroy
2004-11-17 18:43 ` Randy.Dunlap
2004-11-17 19:51   ` Colin Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox