aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2010-01-23 07:53:51 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:43:14 -0500
commit02c95a62d8a0ad0ce71653b9f860b534f89ecc7b (patch)
tree7b51d6c2b4aa597dca48f062678af126b189bc93
parent795877cfa4a4db0982ac21e095dad9fbdc909647 (diff)
ip2: Add module parameter.
Stephen Rothwell found the following warning (x86_64 allmodconfig): drivers/char/ip2/ip2main.c:511: warning: 'ip2_setup' defined but not used This patch adds module parameter to fix the above warning. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/char/ip2/ip2main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 2913d05e8257..c2c915a97667 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -208,6 +208,7 @@ static int DumpFifoBuffer( char __user *, int);
208 208
209static void ip2_init_board(int, const struct firmware *); 209static void ip2_init_board(int, const struct firmware *);
210static unsigned short find_eisa_board(int); 210static unsigned short find_eisa_board(int);
211static int ip2_setup(char *str);
211 212
212/***************/ 213/***************/
213/* Static Data */ 214/* Static Data */
@@ -285,7 +286,10 @@ MODULE_AUTHOR("Doug McNash");
285MODULE_DESCRIPTION("Computone IntelliPort Plus Driver"); 286MODULE_DESCRIPTION("Computone IntelliPort Plus Driver");
286MODULE_LICENSE("GPL"); 287MODULE_LICENSE("GPL");
287 288
289#define MAX_CMD_STR 50
290
288static int poll_only; 291static int poll_only;
292static char cmd[MAX_CMD_STR];
289 293
290static int Eisa_irq; 294static int Eisa_irq;
291static int Eisa_slot; 295static int Eisa_slot;
@@ -309,6 +313,8 @@ module_param_array(io, int, NULL, 0);
309MODULE_PARM_DESC(io, "I/O ports for IntelliPort Cards"); 313MODULE_PARM_DESC(io, "I/O ports for IntelliPort Cards");
310module_param(poll_only, bool, 0); 314module_param(poll_only, bool, 0);
311MODULE_PARM_DESC(poll_only, "Do not use card interrupts"); 315MODULE_PARM_DESC(poll_only, "Do not use card interrupts");
316module_param_string(ip2, cmd, MAX_CMD_STR, 0);
317MODULE_PARM_DESC(ip2, "Contains module parameter passed with 'ip2='");
312 318
313/* for sysfs class support */ 319/* for sysfs class support */
314static struct class *ip2_class; 320static struct class *ip2_class;
@@ -538,12 +544,19 @@ static int __init ip2_loadmain(void)
538 i2eBordStrPtr pB = NULL; 544 i2eBordStrPtr pB = NULL;
539 int rc = -1; 545 int rc = -1;
540 const struct firmware *fw = NULL; 546 const struct firmware *fw = NULL;
547 char *str;
548
549 str = cmd;
541 550
542 if (poll_only) { 551 if (poll_only) {
543 /* Hard lock the interrupts to zero */ 552 /* Hard lock the interrupts to zero */
544 irq[0] = irq[1] = irq[2] = irq[3] = poll_only = 0; 553 irq[0] = irq[1] = irq[2] = irq[3] = poll_only = 0;
545 } 554 }
546 555
556 /* Check module parameter with 'ip2=' has been passed or not */
557 if (!poll_only && (!strncmp(str, "ip2=", 4)))
558 ip2_setup(str);
559
547 ip2trace(ITRC_NO_PORT, ITRC_INIT, ITRC_ENTER, 0); 560 ip2trace(ITRC_NO_PORT, ITRC_INIT, ITRC_ENTER, 0);
548 561
549 /* process command line arguments to modprobe or 562 /* process command line arguments to modprobe or