diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-05 12:26:09 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-17 04:01:30 -0500 |
commit | 9d3d945a8d5be2c915f646e8dff8422486a77030 (patch) | |
tree | 7e0557484ef0e8c6de6e5da3f9d7b08ab1b5b2c4 /arch/arm/mach-imx/mach-mx27ads.c | |
parent | c194daad0e0de94ed5e03aa723eb56b4a3ae9738 (diff) |
ARM: imx: dynamically register mxc-mmc devices
... plus a trivial simplification of mx21ads_sdhc_init()
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/mach-mx27ads.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx27ads.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index d97b25bffe7b..370481b3d908 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <mach/gpio.h> | 30 | #include <mach/gpio.h> |
31 | #include <mach/iomux-mx27.h> | 31 | #include <mach/iomux-mx27.h> |
32 | #include <mach/mxc_nand.h> | 32 | #include <mach/mxc_nand.h> |
33 | #include <mach/mmc.h> | ||
34 | 33 | ||
35 | #include "devices-imx27.h" | 34 | #include "devices-imx27.h" |
36 | #include "devices.h" | 35 | #include "devices.h" |
@@ -271,12 +270,12 @@ static void mx27ads_sdhc2_exit(struct device *dev, void *data) | |||
271 | free_irq(IRQ_GPIOB(7), data); | 270 | free_irq(IRQ_GPIOB(7), data); |
272 | } | 271 | } |
273 | 272 | ||
274 | static struct imxmmc_platform_data sdhc1_pdata = { | 273 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
275 | .init = mx27ads_sdhc1_init, | 274 | .init = mx27ads_sdhc1_init, |
276 | .exit = mx27ads_sdhc1_exit, | 275 | .exit = mx27ads_sdhc1_exit, |
277 | }; | 276 | }; |
278 | 277 | ||
279 | static struct imxmmc_platform_data sdhc2_pdata = { | 278 | static const struct imxmmc_platform_data sdhc2_pdata __initconst = { |
280 | .init = mx27ads_sdhc2_init, | 279 | .init = mx27ads_sdhc2_init, |
281 | .exit = mx27ads_sdhc2_exit, | 280 | .exit = mx27ads_sdhc2_exit, |
282 | }; | 281 | }; |
@@ -307,8 +306,8 @@ static void __init mx27ads_board_init(void) | |||
307 | ARRAY_SIZE(mx27ads_i2c_devices)); | 306 | ARRAY_SIZE(mx27ads_i2c_devices)); |
308 | imx27_add_imx_i2c(1, &mx27ads_i2c1_data); | 307 | imx27_add_imx_i2c(1, &mx27ads_i2c1_data); |
309 | imx27_add_imx_fb(&mx27ads_fb_data); | 308 | imx27_add_imx_fb(&mx27ads_fb_data); |
310 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | 309 | imx27_add_mxc_mmc(0, &sdhc1_pdata); |
311 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); | 310 | imx27_add_mxc_mmc(1, &sdhc2_pdata); |
312 | 311 | ||
313 | imx27_add_fec(NULL); | 312 | imx27_add_fec(NULL); |
314 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 313 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |