[media] staging: media: lirc_parallel.c: fix coding style
authorZheng Di <zhengdi05@gmail.com>
Sun, 6 Jul 2014 13:37:06 +0000 (10:37 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 26 Jul 2014 19:34:51 +0000 (16:34 -0300)
This patch fix checkpatch:
WARNING: else is not generally useful after a break or return
WARNING: line over 80 characters

[m.chehab@samsung.com: Fix conflicts and use a better coding style for
 passing the parameters to parport_register_device()]
Signed-off-by: Zheng Di <zhengdi05@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/lirc/lirc_parallel.c

index 1394f020e46b4a2283e4684f5d7ec37ee55f190f..672858a089f3861a806e5706649c95308bc42321 100644 (file)
@@ -169,23 +169,22 @@ static unsigned int init_lirc_timer(void)
                        newtimer = (1000000*count)/timeelapsed;
                        pr_info("%u Hz timer detected\n", newtimer);
                        return newtimer;
-               }  else {
-                       newtimer = (1000000*count)/timeelapsed;
-                       if (abs(newtimer - default_timer) > default_timer/10) {
-                               /* bad timer */
-                               pr_notice("bad timer: %u Hz\n", newtimer);
-                               pr_notice("using default timer: %u Hz\n",
-                                         default_timer);
-                               return default_timer;
-                       } else {
-                               pr_info("%u Hz timer detected\n", newtimer);
-                               return newtimer; /* use detected value */
-                       }
                }
-       } else {
-               pr_notice("no timer detected\n");
-               return 0;
+               newtimer = (1000000*count)/timeelapsed;
+               if (abs(newtimer - default_timer) > default_timer/10) {
+                       /* bad timer */
+                       pr_notice("bad timer: %u Hz\n", newtimer);
+                       pr_notice("using default timer: %u Hz\n",
+                                 default_timer);
+                       return default_timer;
+               } else {
+                       pr_info("%u Hz timer detected\n", newtimer);
+                       return newtimer; /* use detected value */
+               }
        }
+
+       pr_notice("no timer detected\n");
+       return 0;
 }
 
 static int lirc_claim(void)
@@ -661,7 +660,8 @@ static int __init lirc_parallel_init(void)
                goto exit_device_put;
        }
        ppdevice = parport_register_device(pport, LIRC_DRIVER_NAME,
-                                          pf, kf, lirc_lirc_irq_handler, 0, NULL);
+                                          pf, kf, lirc_lirc_irq_handler, 0,
+                                          NULL);
        parport_put_port(pport);
        if (ppdevice == NULL) {
                pr_notice("parport_register_device() failed\n");