[PATCH] mach-omap2/serial.c: fix minor bug and checkpatch warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



omap_serial_init() in arch/arm/mach-omap2/serial.c clears the wrong
variable if it can't clk_get() a fclk - fix this.  Also fix some
checkpatch.pl warnings.

Signed-off-by: Paul Walmsley <paul@xxxxxxxxx>
---

 arch/arm/mach-omap2/serial.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 54ab7af..bb79f43 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -18,7 +18,7 @@
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
 
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <asm/arch/common.h>
 #include <asm/arch/board.h>
@@ -127,17 +127,17 @@ void __init omap_serial_init(void)
 		if (IS_ERR(uart_ick[i])) {
 			printk(KERN_ERR "Could not get uart%d_ick\n", i+1);
 			uart_ick[i] = NULL;
-		}
-		else
+		} else {
 			clk_enable(uart_ick[i]);
+		}
 		sprintf(name, "uart%d_fck", i+1);
 		uart_fck[i] = clk_get(NULL, name);
 		if (IS_ERR(uart_fck[i])) {
 			printk(KERN_ERR "Could not get uart%d_fck\n", i+1);
-			uart_ick[i] = NULL;
-		}
-		else
+			uart_fck[i] = NULL;
+		} else {
 			clk_enable(uart_fck[i]);
+		}
 
 		omap_serial_reset(p);
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux