Commit 3d6fd938 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] new module args for ir-kbd-*.c

From: Gerd Knorr <kraxel@bytesex.org>

Use module_param() rather than the deprecated MODULE_PARM() in this driver.
parent 160c2d70
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -170,8 +171,8 @@ struct IR { ...@@ -170,8 +171,8 @@ struct IR {
struct timer_list timer; struct timer_list timer;
}; };
static int debug = 0; /* debug level (0,1,2) */ static int debug;
MODULE_PARM(debug,"i"); module_param(debug, int, 0644); /* debug level (0,1,2) */
#define DEVNAME "ir-kbd-gpio" #define DEVNAME "ir-kbd-gpio"
#define dprintk(fmt, arg...) if (debug) \ #define dprintk(fmt, arg...) if (debug) \
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -55,8 +56,8 @@ struct IR { ...@@ -55,8 +56,8 @@ struct IR {
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* insmod parameters */ /* insmod parameters */
static int debug = 0; /* debug level (0,1,2) */ static int debug;
MODULE_PARM(debug,"i"); module_param(debug, int, 0644); /* debug level (0,1,2) */
#define DEVNAME "ir-kbd-i2c" #define DEVNAME "ir-kbd-i2c"
#define dprintk(level, fmt, arg...) if (debug >= level) \ #define dprintk(level, fmt, arg...) if (debug >= level) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment