aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2011-03-04 17:36:46 -0500
committerTony Lindgren <tony@atomide.com>2011-03-08 18:10:17 -0500
commite7916740bb76379bcde4ce0317259acff8f89f53 (patch)
tree29119691c73159b1197df84c122a41982ae418fb /arch/arm/mach-omap1
parentcd97bb003276a66b2174e5dc589748e5c4bc357e (diff)
OMAP1: McBSP: fix build break for non-multi-OMAP1 configs
Commit 3cf32bba8ca0e0052ca41d74d455a5805b7fea85 ("OMAP: McBSP: Convert McBSP to platform device model") breaks compilation with non-multi-OMAP1 configs: CC arch/arm/mach-omap1/mcbsp.o arch/arm/mach-omap1/mcbsp.c: In function 'omap1_mcbsp_init': arch/arm/mach-omap1/mcbsp.c:384: warning: dereferencing 'void *' pointer arch/arm/mach-omap1/mcbsp.c:387: error: invalid use of void expression arch/arm/mach-omap1/mcbsp.c:390: warning: dereferencing 'void *' pointer arch/arm/mach-omap1/mcbsp.c:393: error: invalid use of void expression Fix by avoiding NULL dereferences. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> [tony@atomide.com: updated description not to remove unnecessary branch name] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/mcbsp.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index e68f6c012fde..d9af9811dedd 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -136,6 +136,8 @@ struct resource omap7xx_mcbsp_res[][6] = {
136 }, 136 },
137}; 137};
138 138
139#define omap7xx_mcbsp_res_0 omap7xx_mcbsp_res[0]
140
139static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = { 141static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = {
140 { 142 {
141 .ops = &omap1_mcbsp_ops, 143 .ops = &omap1_mcbsp_ops,
@@ -147,7 +149,7 @@ static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = {
147#define OMAP7XX_MCBSP_RES_SZ ARRAY_SIZE(omap7xx_mcbsp_res[1]) 149#define OMAP7XX_MCBSP_RES_SZ ARRAY_SIZE(omap7xx_mcbsp_res[1])
148#define OMAP7XX_MCBSP_COUNT ARRAY_SIZE(omap7xx_mcbsp_res) 150#define OMAP7XX_MCBSP_COUNT ARRAY_SIZE(omap7xx_mcbsp_res)
149#else 151#else
150#define omap7xx_mcbsp_res NULL 152#define omap7xx_mcbsp_res_0 NULL
151#define omap7xx_mcbsp_pdata NULL 153#define omap7xx_mcbsp_pdata NULL
152#define OMAP7XX_MCBSP_RES_SZ 0 154#define OMAP7XX_MCBSP_RES_SZ 0
153#define OMAP7XX_MCBSP_COUNT 0 155#define OMAP7XX_MCBSP_COUNT 0
@@ -238,6 +240,8 @@ struct resource omap15xx_mcbsp_res[][6] = {
238 }, 240 },
239}; 241};
240 242
243#define omap15xx_mcbsp_res_0 omap15xx_mcbsp_res[0]
244
241static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { 245static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
242 { 246 {
243 .ops = &omap1_mcbsp_ops, 247 .ops = &omap1_mcbsp_ops,
@@ -252,7 +256,7 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
252#define OMAP15XX_MCBSP_RES_SZ ARRAY_SIZE(omap15xx_mcbsp_res[1]) 256#define OMAP15XX_MCBSP_RES_SZ ARRAY_SIZE(omap15xx_mcbsp_res[1])
253#define OMAP15XX_MCBSP_COUNT ARRAY_SIZE(omap15xx_mcbsp_res) 257#define OMAP15XX_MCBSP_COUNT ARRAY_SIZE(omap15xx_mcbsp_res)
254#else 258#else
255#define omap15xx_mcbsp_res NULL 259#define omap15xx_mcbsp_res_0 NULL
256#define omap15xx_mcbsp_pdata NULL 260#define omap15xx_mcbsp_pdata NULL
257#define OMAP15XX_MCBSP_RES_SZ 0 261#define OMAP15XX_MCBSP_RES_SZ 0
258#define OMAP15XX_MCBSP_COUNT 0 262#define OMAP15XX_MCBSP_COUNT 0
@@ -343,6 +347,8 @@ struct resource omap16xx_mcbsp_res[][6] = {
343 }, 347 },
344}; 348};
345 349
350#define omap16xx_mcbsp_res_0 omap16xx_mcbsp_res[0]
351
346static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { 352static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
347 { 353 {
348 .ops = &omap1_mcbsp_ops, 354 .ops = &omap1_mcbsp_ops,
@@ -357,7 +363,7 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
357#define OMAP16XX_MCBSP_RES_SZ ARRAY_SIZE(omap16xx_mcbsp_res[1]) 363#define OMAP16XX_MCBSP_RES_SZ ARRAY_SIZE(omap16xx_mcbsp_res[1])
358#define OMAP16XX_MCBSP_COUNT ARRAY_SIZE(omap16xx_mcbsp_res) 364#define OMAP16XX_MCBSP_COUNT ARRAY_SIZE(omap16xx_mcbsp_res)
359#else 365#else
360#define omap16xx_mcbsp_res NULL 366#define omap16xx_mcbsp_res_0 NULL
361#define omap16xx_mcbsp_pdata NULL 367#define omap16xx_mcbsp_pdata NULL
362#define OMAP16XX_MCBSP_RES_SZ 0 368#define OMAP16XX_MCBSP_RES_SZ 0
363#define OMAP16XX_MCBSP_COUNT 0 369#define OMAP16XX_MCBSP_COUNT 0
@@ -381,19 +387,19 @@ static int __init omap1_mcbsp_init(void)
381 return -ENOMEM; 387 return -ENOMEM;
382 388
383 if (cpu_is_omap7xx()) 389 if (cpu_is_omap7xx())
384 omap_mcbsp_register_board_cfg(omap7xx_mcbsp_res[0], 390 omap_mcbsp_register_board_cfg(omap7xx_mcbsp_res_0,
385 OMAP7XX_MCBSP_RES_SZ, 391 OMAP7XX_MCBSP_RES_SZ,
386 omap7xx_mcbsp_pdata, 392 omap7xx_mcbsp_pdata,
387 OMAP7XX_MCBSP_COUNT); 393 OMAP7XX_MCBSP_COUNT);
388 394
389 if (cpu_is_omap15xx()) 395 if (cpu_is_omap15xx())
390 omap_mcbsp_register_board_cfg(omap15xx_mcbsp_res[0], 396 omap_mcbsp_register_board_cfg(omap15xx_mcbsp_res_0,
391 OMAP15XX_MCBSP_RES_SZ, 397 OMAP15XX_MCBSP_RES_SZ,
392 omap15xx_mcbsp_pdata, 398 omap15xx_mcbsp_pdata,
393 OMAP15XX_MCBSP_COUNT); 399 OMAP15XX_MCBSP_COUNT);
394 400
395 if (cpu_is_omap16xx()) 401 if (cpu_is_omap16xx())
396 omap_mcbsp_register_board_cfg(omap16xx_mcbsp_res[0], 402 omap_mcbsp_register_board_cfg(omap16xx_mcbsp_res_0,
397 OMAP16XX_MCBSP_RES_SZ, 403 OMAP16XX_MCBSP_RES_SZ,
398 omap16xx_mcbsp_pdata, 404 omap16xx_mcbsp_pdata,
399 OMAP16XX_MCBSP_COUNT); 405 OMAP16XX_MCBSP_COUNT);