From: Minkyu Kang Date: Mon, 24 Jan 2011 05:43:25 +0000 (+0900) Subject: S5P: serial: Use the inline function instead of static value X-Git-Tag: v2011.03-rc1~2^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0617c621def4bea5c6013dbc698ecf4f75d97c1;p=u-boot S5P: serial: Use the inline function instead of static value Signed-off-by: Minkyu Kang --- diff --git a/arch/arm/include/asm/arch-s5pc1xx/uart.h b/arch/arm/include/asm/arch-s5pc1xx/uart.h index f6eeab45cd..1c56739f72 100644 --- a/arch/arm/include/asm/arch-s5pc1xx/uart.h +++ b/arch/arm/include/asm/arch-s5pc1xx/uart.h @@ -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__ */ diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index 9c1cbf4a48..f1ffa29fd7 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -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);