diff options
author | Pavel Machek <pavel@ucw.cz> | 2007-10-17 02:30:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:01 -0400 |
commit | f4a1c2bce002f683801bcdbbc9fd89804614fb6b (patch) | |
tree | 43eab2e3090d0101b2333224016a804a46613747 /drivers/char/lp.c | |
parent | 4749252776712e587c7c7619cbf0342b080c7f44 (diff) |
lp_console: cleanups
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>
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index c59e2a0996cc..81674d7c56c7 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -144,7 +144,7 @@ static unsigned int lp_count = 0; | |||
144 | static struct class *lp_class; | 144 | static struct class *lp_class; |
145 | 145 | ||
146 | #ifdef CONFIG_LP_CONSOLE | 146 | #ifdef CONFIG_LP_CONSOLE |
147 | static struct parport *console_registered; // initially NULL | 147 | static struct parport *console_registered; |
148 | #endif /* CONFIG_LP_CONSOLE */ | 148 | #endif /* CONFIG_LP_CONSOLE */ |
149 | 149 | ||
150 | #undef LP_DEBUG | 150 | #undef LP_DEBUG |
@@ -749,8 +749,8 @@ static struct console lpcons = { | |||
749 | /* --- initialisation code ------------------------------------- */ | 749 | /* --- initialisation code ------------------------------------- */ |
750 | 750 | ||
751 | static int parport_nr[LP_NO] = { [0 ... LP_NO-1] = LP_PARPORT_UNSPEC }; | 751 | static int parport_nr[LP_NO] = { [0 ... LP_NO-1] = LP_PARPORT_UNSPEC }; |
752 | static char *parport[LP_NO] = { NULL, }; | 752 | static char *parport[LP_NO]; |
753 | static int reset = 0; | 753 | static int reset; |
754 | 754 | ||
755 | module_param_array(parport, charp, NULL, 0); | 755 | module_param_array(parport, charp, NULL, 0); |
756 | module_param(reset, bool, 0); | 756 | module_param(reset, bool, 0); |
@@ -758,10 +758,10 @@ module_param(reset, bool, 0); | |||
758 | #ifndef MODULE | 758 | #ifndef MODULE |
759 | static int __init lp_setup (char *str) | 759 | static int __init lp_setup (char *str) |
760 | { | 760 | { |
761 | static int parport_ptr; // initially zero | 761 | static int parport_ptr; |
762 | int x; | 762 | int x; |
763 | 763 | ||
764 | if (get_option (&str, &x)) { | 764 | if (get_option(&str, &x)) { |
765 | if (x == 0) { | 765 | if (x == 0) { |
766 | /* disable driver on "lp=" or "lp=0" */ | 766 | /* disable driver on "lp=" or "lp=0" */ |
767 | parport_nr[0] = LP_PARPORT_OFF; | 767 | parport_nr[0] = LP_PARPORT_OFF; |
@@ -807,7 +807,7 @@ static int lp_register(int nr, struct parport *port) | |||
807 | #ifdef CONFIG_LP_CONSOLE | 807 | #ifdef CONFIG_LP_CONSOLE |
808 | if (!nr) { | 808 | if (!nr) { |
809 | if (port->modes & PARPORT_MODE_SAFEININT) { | 809 | if (port->modes & PARPORT_MODE_SAFEININT) { |
810 | register_console (&lpcons); | 810 | register_console(&lpcons); |
811 | console_registered = port; | 811 | console_registered = port; |
812 | printk (KERN_INFO "lp%d: console ready\n", CONSOLE_LP); | 812 | printk (KERN_INFO "lp%d: console ready\n", CONSOLE_LP); |
813 | } else | 813 | } else |
@@ -823,8 +823,7 @@ static void lp_attach (struct parport *port) | |||
823 | { | 823 | { |
824 | unsigned int i; | 824 | unsigned int i; |
825 | 825 | ||
826 | switch (parport_nr[0]) | 826 | switch (parport_nr[0]) { |
827 | { | ||
828 | case LP_PARPORT_UNSPEC: | 827 | case LP_PARPORT_UNSPEC: |
829 | case LP_PARPORT_AUTO: | 828 | case LP_PARPORT_AUTO: |
830 | if (parport_nr[0] == LP_PARPORT_AUTO && | 829 | if (parport_nr[0] == LP_PARPORT_AUTO && |
@@ -855,7 +854,7 @@ static void lp_detach (struct parport *port) | |||
855 | /* Write this some day. */ | 854 | /* Write this some day. */ |
856 | #ifdef CONFIG_LP_CONSOLE | 855 | #ifdef CONFIG_LP_CONSOLE |
857 | if (console_registered == port) { | 856 | if (console_registered == port) { |
858 | unregister_console (&lpcons); | 857 | unregister_console(&lpcons); |
859 | console_registered = NULL; | 858 | console_registered = NULL; |
860 | } | 859 | } |
861 | #endif /* CONFIG_LP_CONSOLE */ | 860 | #endif /* CONFIG_LP_CONSOLE */ |