diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-05 17:26:09 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-17 10:01:30 +0100 |
commit | 9d3d945a8d5be2c915f646e8dff8422486a77030 (patch) | |
tree | 7e0557484ef0e8c6de6e5da3f9d7b08ab1b5b2c4 /arch/arm/mach-imx/mach-mx21ads.c | |
parent | c194daad0e0de94ed5e03aa723eb56b4a3ae9738 (diff) | |
download | blackbird-op-linux-9d3d945a8d5be2c915f646e8dff8422486a77030.tar.gz blackbird-op-linux-9d3d945a8d5be2c915f646e8dff8422486a77030.zip |
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-mx21ads.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx21ads.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 4820a67b8abb..83c064a3cf4b 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c @@ -26,7 +26,6 @@ #include <asm/mach/map.h> #include <mach/iomux-mx21.h> #include <mach/mxc_nand.h> -#include <mach/mmc.h> #include "devices-imx21.h" #include "devices.h" @@ -232,15 +231,8 @@ static int mx21ads_sdhc_get_ro(struct device *dev) static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, void *data) { - int ret; - - ret = request_irq(IRQ_GPIOD(25), detect_irq, + return request_irq(IRQ_GPIOD(25), detect_irq, IRQF_TRIGGER_FALLING, "mmc-detect", data); - if (ret) - goto out; - return 0; -out: - return ret; } static void mx21ads_sdhc_exit(struct device *dev, void *data) @@ -248,7 +240,7 @@ static void mx21ads_sdhc_exit(struct device *dev, void *data) free_irq(IRQ_GPIOD(25), data); } -static struct imxmmc_platform_data mx21ads_sdhc_pdata = { +static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { .ocr_avail = MMC_VDD_29_30 | MMC_VDD_30_31, /* 3.0V */ .get_ro = mx21ads_sdhc_get_ro, .init = mx21ads_sdhc_init, @@ -296,7 +288,7 @@ static void __init mx21ads_board_init(void) imx21_add_imx_uart2(&uart_pdata_norts); imx21_add_imx_uart3(&uart_pdata_rts); imx21_add_imx_fb(&mx21ads_fb_data); - mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); + imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata); imx21_add_mxc_nand(&mx21ads_nand_board_info); platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |