aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-02-26 11:55:35 -0500
committerArnd Bergmann <arnd@arndb.de>2014-03-21 13:26:20 -0400
commit0443a653982942da4237b8344027bbb86e4b83a1 (patch)
tree4591fd96af266d97671a491a5677be857838a6ac /arch/arm/plat-samsung
parent943fa72629d9f5e8d3df5fc39351fe3360ff03cb (diff)
ARM: samsung: allow serial driver to be disabled
If CONFIG_SERIAL_SAMSUNG is disabled, we run into build errors with some samsung platforms. This adds a couple of #ifdef statements to hopefully deal with this more gracefully. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Tomasz Figa <tomasz.figa@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
index aa9511b6914a..a30df396ca34 100644
--- a/arch/arm/plat-samsung/init.c
+++ b/arch/arm/plat-samsung/init.c
@@ -97,7 +97,9 @@ void __init s3c24xx_init_clocks(int xtal)
97#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS) 97#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
98static int nr_uarts __initdata = 0; 98static int nr_uarts __initdata = 0;
99 99
100#ifdef CONFIG_SERIAL_SAMSUNG_UARTS
100static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; 101static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS];
102#endif
101 103
102/* s3c24xx_init_uartdevs 104/* s3c24xx_init_uartdevs
103 * 105 *
@@ -112,6 +114,7 @@ void __init s3c24xx_init_uartdevs(char *name,
112 struct s3c24xx_uart_resources *res, 114 struct s3c24xx_uart_resources *res,
113 struct s3c2410_uartcfg *cfg, int no) 115 struct s3c2410_uartcfg *cfg, int no)
114{ 116{
117#ifdef CONFIG_SERIAL_SAMSUNG_UARTS
115 struct platform_device *platdev; 118 struct platform_device *platdev;
116 struct s3c2410_uartcfg *cfgptr = uart_cfgs; 119 struct s3c2410_uartcfg *cfgptr = uart_cfgs;
117 struct s3c24xx_uart_resources *resp; 120 struct s3c24xx_uart_resources *resp;
@@ -134,6 +137,7 @@ void __init s3c24xx_init_uartdevs(char *name,
134 } 137 }
135 138
136 nr_uarts = no; 139 nr_uarts = no;
140#endif
137} 141}
138 142
139void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no) 143void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)