lkml.org 
[lkml]   [2006]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH][SBC8360] Re: Neverending module_param() bugs
On Sun, 13 Aug 2006, Alexey Dobriyan wrote:

> Can someone think of a way to explicitly tell driver author that last
> argument of module_param is PERMISSIONS, not default value? It's late
> here I can't. Preferably resulting in compilation failure.
>
> drivers/char/watchdog/sbc8360.c:203:module_param(timeout, int, 27);

Here's my fix for sbc8360, inlined and attached. Please merge.

Regards,
Ian Morgan

--
-------------------------------------------------------------------
Ian E. Morgan Vice President & C.O.O. Webcon, Inc.
imorgan at webcon dot ca PGP: #2DA40D07 www.webcon.ca
* Customized Linux Network Solutions for your Business *
-------------------------------------------------------------------

--- linux-2.6.17.11/drivers/char/watchdog/sbc8360.c.orig 2006-08-29 12:55:26.000000000 -0400
+++ linux-2.6.17.11/drivers/char/watchdog/sbc8360.c 2006-08-29 12:58:20.000000000 -0400
@@ -201,7 +201,7 @@ static int wd_margin = 0xB;
static int wd_multiplier = 2;
static int nowayout = WATCHDOG_NOWAYOUT;

-module_param(timeout, int, 27);
+module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout,
@@ -408,7 +408,7 @@ module_exit(sbc8360_exit);
MODULE_AUTHOR("Ian E. Morgan <imorgan@webcon.ca>");
MODULE_DESCRIPTION("SBC8360 watchdog driver");
MODULE_LICENSE("GPL");
-MODULE_VERSION("1.0");
+MODULE_VERSION("1.01");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);

/* end of sbc8360.c */--- linux-2.6.17.11/drivers/char/watchdog/sbc8360.c.orig 2006-08-29 12:55:26.000000000 -0400
+++ linux-2.6.17.11/drivers/char/watchdog/sbc8360.c 2006-08-29 12:58:20.000000000 -0400
@@ -201,7 +201,7 @@ static int wd_margin = 0xB;
static int wd_multiplier = 2;
static int nowayout = WATCHDOG_NOWAYOUT;

-module_param(timeout, int, 27);
+module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout,
@@ -408,7 +408,7 @@ module_exit(sbc8360_exit);
MODULE_AUTHOR("Ian E. Morgan <imorgan@webcon.ca>");
MODULE_DESCRIPTION("SBC8360 watchdog driver");
MODULE_LICENSE("GPL");
-MODULE_VERSION("1.0");
+MODULE_VERSION("1.01");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);

/* end of sbc8360.c */
\
 
 \ /
  Last update: 2006-08-29 19:11    [W:0.077 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site