Re: [PATCH 2.6] Update to module_params() in 3c59x.c

From: Randy.Dunlap
Date: Sun Jan 02 2005 - 19:56:39 EST


Maciej Soltysiak wrote:
Hi!

This patch:
1) updates the 3c59x.c driver to use module_param() stuff.
2) kills a strange character somewhere at the bottom of the patch

I hope it is right, it is my first glance at module_param() :-)

3c59x.c | 67 +++++++++++++++++++++++++++++++---------------------------------
1 files changed, 33 insertions(+), 34 deletions(-)

Oh, in order to use the module_param() macros i had to move the variable
before module_param.

Signed-off-by: Maciej Soltysiak <solt2@xxxxxxxxxxxxxxxxx>

Please review and hopefully apply.
Regars,
Maciej

Looks pretty good, a couple of minor comments below.

diff -ru linux.orig/drivers/net/3c59x.c linux/drivers/net/3c59x.c
--- linux.orig/drivers/net/3c59x.c 2004-12-30 15:27:40.000000000 +0100
+++ linux/drivers/net/3c59x.c 2004-12-30 14:33:29.000000000 +0100
@@ -240,6 +240,7 @@
#include <linux/config.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
module.h #includes moduleparam.h already so this isn't needed.

@@ -279,21 +297,21 @@
-MODULE_PARM(debug, "i");
+module_param(debug, int, 0);

I would make the 3rd parameter (permissions) be 0644 so that it can
be changed after the module is loaded (run-time debug flag changing).

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/