aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-08 05:38:20 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:53 -0500
commit7f5899252b5052387ee983d67bbc55eafd33a516 (patch)
tree0f0058706ca4675973517ab520a22109854ea06b
parente7eafa3245be66b3db5d430e2fb3414b1a32298a (diff)
[PATCH] Char: mxser_new, debug printk dependent on DEBUG
Print some debug info only when DEBUG is enabled (use pr_debug macro). Eliminate verbose kernel parameter which takes care of this. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/char/mxser_new.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 1ce36dcac86a..0f4660aea260 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -244,7 +244,6 @@ MODULE_DEVICE_TABLE(pci, mxser_pcibrds);
244static int ioaddr[MXSER_BOARDS] = { 0, 0, 0, 0 }; 244static int ioaddr[MXSER_BOARDS] = { 0, 0, 0, 0 };
245static int ttymajor = MXSERMAJOR; 245static int ttymajor = MXSERMAJOR;
246static int calloutmajor = MXSERCUMAJOR; 246static int calloutmajor = MXSERCUMAJOR;
247static int verbose = 0;
248 247
249/* Variables for insmod */ 248/* Variables for insmod */
250 249
@@ -252,7 +251,6 @@ MODULE_AUTHOR("Casper Yang");
252MODULE_DESCRIPTION("MOXA Smartio/Industio Family Multiport Board Device Driver"); 251MODULE_DESCRIPTION("MOXA Smartio/Industio Family Multiport Board Device Driver");
253module_param_array(ioaddr, int, NULL, 0); 252module_param_array(ioaddr, int, NULL, 0);
254module_param(ttymajor, int, 0); 253module_param(ttymajor, int, 0);
255module_param(verbose, bool, 0);
256MODULE_LICENSE("GPL"); 254MODULE_LICENSE("GPL");
257 255
258struct mxser_log { 256struct mxser_log {
@@ -493,11 +491,9 @@ static int __init mxser_module_init(void)
493{ 491{
494 int ret; 492 int ret;
495 493
496 if (verbose) 494 pr_debug("Loading module mxser ...\n");
497 printk(KERN_DEBUG "Loading module mxser ...\n");
498 ret = mxser_init(); 495 ret = mxser_init();
499 if (verbose) 496 pr_debug("Done.\n");
500 printk(KERN_DEBUG "Done.\n");
501 return ret; 497 return ret;
502} 498}
503 499
@@ -505,8 +501,7 @@ static void __exit mxser_module_exit(void)
505{ 501{
506 int i, err; 502 int i, err;
507 503
508 if (verbose) 504 pr_debug("Unloading module mxser ...\n");
509 printk(KERN_DEBUG "Unloading module mxser ...\n");
510 505
511 err = tty_unregister_driver(mxvar_sdriver); 506 err = tty_unregister_driver(mxvar_sdriver);
512 if (!err) 507 if (!err)
@@ -532,8 +527,7 @@ static void __exit mxser_module_exit(void)
532 } 527 }
533 } 528 }
534 } 529 }
535 if (verbose) 530 pr_debug("Done.\n");
536 printk(KERN_DEBUG "Done.\n");
537} 531}
538 532
539static void process_txrx_fifo(struct mxser_port *info) 533static void process_txrx_fifo(struct mxser_port *info)
@@ -562,10 +556,7 @@ static int __devinit mxser_initbrd(struct mxser_board *brd)
562 unsigned int i; 556 unsigned int i;
563 int retval; 557 int retval;
564 558
565 /*if (verbose) */ { 559 printk(KERN_INFO "max. baud rate = %d bps.\n", brd->ports[0].max_baud);
566 printk(" max. baud rate = %d bps.\n",
567 brd->ports[0].max_baud);
568 }
569 560
570 for (i = 0; i < brd->nports; i++) { 561 for (i = 0; i < brd->nports; i++) {
571 info = &brd->ports[i]; 562 info = &brd->ports[i];