S5P: serial: Use the inline function instead of static value
authorMinkyu Kang <mk7.kang@samsung.com>
Mon, 24 Jan 2011 05:43:25 +0000 (14:43 +0900)
committerAlbert Aribaud <albert.aribaud@free.fr>
Tue, 1 Feb 2011 23:54:45 +0000 (00:54 +0100)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/include/asm/arch-s5pc1xx/uart.h
drivers/serial/serial_s5p.c

index f6eeab45cdc23f4fe7da73226b72f80f52d37ff5..1c56739f72f192388537116b62f3e58e3e7186e1 100644 (file)
@@ -48,7 +48,10 @@ struct s5p_uart {
        unsigned char   res3[0x3d0];
 };
 
-static int use_divslot = 1;
+static inline int s5p_uart_divslot(void)
+{
+       return 1;
+}
 
 #endif /* __ASSEMBLY__ */
 
index 9c1cbf4a4832ae10a1fe4601b2ef329113e87574..f1ffa29fd7f987062f1ef8f5236cbbadc59e05cc 100644 (file)
@@ -72,7 +72,7 @@ void serial_setbrg_dev(const int dev_index)
 
        writel(val / 16 - 1, &uart->ubrdiv);
 
-       if (use_divslot)
+       if (s5p_uart_divslot())
                writew(udivslot[val % 16], &uart->rest.slot);
        else
                writeb(val % 16, &uart->rest.value);