Commit f4a1c2bce002f683801bcdbbc9fd89804614fb6b

Authored by Pavel Machek
Committed by Linus Torvalds
1 parent 4749252776

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>

Showing 1 changed file with 8 additions and 9 deletions Side-by-side Diff

... ... @@ -144,7 +144,7 @@
144 144 static struct class *lp_class;
145 145  
146 146 #ifdef CONFIG_LP_CONSOLE
147   -static struct parport *console_registered; // initially NULL
  147 +static struct parport *console_registered;
148 148 #endif /* CONFIG_LP_CONSOLE */
149 149  
150 150 #undef LP_DEBUG
... ... @@ -749,8 +749,8 @@
749 749 /* --- initialisation code ------------------------------------- */
750 750  
751 751 static int parport_nr[LP_NO] = { [0 ... LP_NO-1] = LP_PARPORT_UNSPEC };
752   -static char *parport[LP_NO] = { NULL, };
753   -static int reset = 0;
  752 +static char *parport[LP_NO];
  753 +static int reset;
754 754  
755 755 module_param_array(parport, charp, NULL, 0);
756 756 module_param(reset, bool, 0);
757 757  
... ... @@ -758,10 +758,10 @@
758 758 #ifndef MODULE
759 759 static int __init lp_setup (char *str)
760 760 {
761   - static int parport_ptr; // initially zero
  761 + static int parport_ptr;
762 762 int x;
763 763  
764   - if (get_option (&str, &x)) {
  764 + if (get_option(&str, &x)) {
765 765 if (x == 0) {
766 766 /* disable driver on "lp=" or "lp=0" */
767 767 parport_nr[0] = LP_PARPORT_OFF;
... ... @@ -807,7 +807,7 @@
807 807 #ifdef CONFIG_LP_CONSOLE
808 808 if (!nr) {
809 809 if (port->modes & PARPORT_MODE_SAFEININT) {
810   - register_console (&lpcons);
  810 + register_console(&lpcons);
811 811 console_registered = port;
812 812 printk (KERN_INFO "lp%d: console ready\n", CONSOLE_LP);
813 813 } else
... ... @@ -823,8 +823,7 @@
823 823 {
824 824 unsigned int i;
825 825  
826   - switch (parport_nr[0])
827   - {
  826 + switch (parport_nr[0]) {
828 827 case LP_PARPORT_UNSPEC:
829 828 case LP_PARPORT_AUTO:
830 829 if (parport_nr[0] == LP_PARPORT_AUTO &&
... ... @@ -855,7 +854,7 @@
855 854 /* Write this some day. */
856 855 #ifdef CONFIG_LP_CONSOLE
857 856 if (console_registered == port) {
858   - unregister_console (&lpcons);
  857 + unregister_console(&lpcons);
859 858 console_registered = NULL;
860 859 }
861 860 #endif /* CONFIG_LP_CONSOLE */