diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-04-07 04:44:33 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-04-10 21:59:23 -0400 |
commit | 2cab0292285ce3180224c130d2fb1104aee44ff1 (patch) | |
tree | a3f8bea618053618e7e1461b743ac7cb6e444454 /arch/arm/mach-pxa/pxa3xx.c | |
parent | 31880c37c11e28cb81c70757e38392b42e695dc6 (diff) |
ARM: pxa: remove cpu_is_xxx in gpio driver
Avoid to use cpu_is_xxx() in pxa gpio driver. Use platform_device_id
to identify the difference.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 656a1bb16d14..572666a1e4a8 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -92,7 +92,8 @@ static struct clk_lookup pxa3xx_clkregs[] = { | |||
92 | INIT_CLKREG(&clk_pxa3xx_mmc1, "pxa2xx-mci.0", NULL), | 92 | INIT_CLKREG(&clk_pxa3xx_mmc1, "pxa2xx-mci.0", NULL), |
93 | INIT_CLKREG(&clk_pxa3xx_mmc2, "pxa2xx-mci.1", NULL), | 93 | INIT_CLKREG(&clk_pxa3xx_mmc2, "pxa2xx-mci.1", NULL), |
94 | INIT_CLKREG(&clk_pxa3xx_smemc, "pxa2xx-pcmcia", NULL), | 94 | INIT_CLKREG(&clk_pxa3xx_smemc, "pxa2xx-pcmcia", NULL), |
95 | INIT_CLKREG(&clk_pxa3xx_gpio, "pxa-gpio", NULL), | 95 | INIT_CLKREG(&clk_pxa3xx_gpio, "pxa3xx-gpio", NULL), |
96 | INIT_CLKREG(&clk_pxa3xx_gpio, "pxa93x-gpio", NULL), | ||
96 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | 97 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), |
97 | }; | 98 | }; |
98 | 99 | ||
@@ -436,7 +437,6 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) | |||
436 | } | 437 | } |
437 | 438 | ||
438 | static struct platform_device *devices[] __initdata = { | 439 | static struct platform_device *devices[] __initdata = { |
439 | &pxa_device_gpio, | ||
440 | &pxa27x_device_udc, | 440 | &pxa27x_device_udc, |
441 | &pxa_device_pmu, | 441 | &pxa_device_pmu, |
442 | &pxa_device_i2s, | 442 | &pxa_device_i2s, |
@@ -482,8 +482,14 @@ static int __init pxa3xx_init(void) | |||
482 | register_syscore_ops(&pxa3xx_mfp_syscore_ops); | 482 | register_syscore_ops(&pxa3xx_mfp_syscore_ops); |
483 | register_syscore_ops(&pxa3xx_clock_syscore_ops); | 483 | register_syscore_ops(&pxa3xx_clock_syscore_ops); |
484 | 484 | ||
485 | if (!of_have_populated_dt()) | 485 | if (of_have_populated_dt()) |
486 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 486 | return 0; |
487 | |||
488 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
489 | if (ret) | ||
490 | return ret; | ||
491 | if (cpu_is_pxa300() || cpu_is_pxa310() || cpu_is_pxa320()) | ||
492 | ret = platform_device_register(&pxa3xx_device_gpio); | ||
487 | } | 493 | } |
488 | 494 | ||
489 | return ret; | 495 | return ret; |