lp_console: cleanups
authorPavel Machek <pavel@ucw.cz>
Wed, 17 Oct 2007 06:30:29 +0000 (23:30 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:01 +0000 (08:43 -0700)
Remove NULL initializers and clean whitespace a bit.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/lp.c

index c59e2a0..81674d7 100644 (file)
@@ -144,7 +144,7 @@ static unsigned int lp_count = 0;
 static struct class *lp_class;
 
 #ifdef CONFIG_LP_CONSOLE
-static struct parport *console_registered; // initially NULL
+static struct parport *console_registered;
 #endif /* CONFIG_LP_CONSOLE */
 
 #undef LP_DEBUG
@@ -749,8 +749,8 @@ static struct console lpcons = {
 /* --- initialisation code ------------------------------------- */
 
 static int parport_nr[LP_NO] = { [0 ... LP_NO-1] = LP_PARPORT_UNSPEC };
-static char *parport[LP_NO] = { NULL,  };
-static int reset = 0;
+static char *parport[LP_NO];
+static int reset;
 
 module_param_array(parport, charp, NULL, 0);
 module_param(reset, bool, 0);
@@ -758,10 +758,10 @@ module_param(reset, bool, 0);
 #ifndef MODULE
 static int __init lp_setup (char *str)
 {
-       static int parport_ptr; // initially zero
+       static int parport_ptr;
        int x;
 
-       if (get_option (&str, &x)) {
+       if (get_option(&str, &x)) {
                if (x == 0) {
                        /* disable driver on "lp=" or "lp=0" */
                        parport_nr[0] = LP_PARPORT_OFF;
@@ -807,7 +807,7 @@ static int lp_register(int nr, struct parport *port)
 #ifdef CONFIG_LP_CONSOLE
        if (!nr) {
                if (port->modes & PARPORT_MODE_SAFEININT) {
-                       register_console (&lpcons);
+                       register_console(&lpcons);
                        console_registered = port;
                        printk (KERN_INFO "lp%d: console ready\n", CONSOLE_LP);
                } else
@@ -823,8 +823,7 @@ static void lp_attach (struct parport *port)
 {
        unsigned int i;
 
-       switch (parport_nr[0])
-       {
+       switch (parport_nr[0]) {
        case LP_PARPORT_UNSPEC:
        case LP_PARPORT_AUTO:
                if (parport_nr[0] == LP_PARPORT_AUTO &&
@@ -855,7 +854,7 @@ static void lp_detach (struct parport *port)
        /* Write this some day. */
 #ifdef CONFIG_LP_CONSOLE
        if (console_registered == port) {
-               unregister_console (&lpcons);
+               unregister_console(&lpcons);
                console_registered = NULL;
        }
 #endif /* CONFIG_LP_CONSOLE */