diff options
Diffstat (limited to 'arch/arm/mach-pxa/littleton.c')
-rw-r--r-- | arch/arm/mach-pxa/littleton.c | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 55b3788fd1ae..13848955d133 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -265,45 +265,12 @@ static inline void littleton_init_keypad(void) {} | |||
265 | #endif | 265 | #endif |
266 | 266 | ||
267 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) | 267 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) |
268 | static int littleton_mci_init(struct device *dev, | ||
269 | irq_handler_t littleton_detect_int, void *data) | ||
270 | { | ||
271 | int err, gpio_cd = GPIO_MMC1_CARD_DETECT; | ||
272 | |||
273 | err = gpio_request(gpio_cd, "mmc card detect"); | ||
274 | if (err) | ||
275 | goto err_request_cd; | ||
276 | |||
277 | gpio_direction_input(gpio_cd); | ||
278 | |||
279 | err = request_irq(gpio_to_irq(gpio_cd), littleton_detect_int, | ||
280 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
281 | "mmc card detect", data); | ||
282 | if (err) { | ||
283 | dev_err(dev, "failed to request card detect IRQ\n"); | ||
284 | goto err_request_irq; | ||
285 | } | ||
286 | return 0; | ||
287 | |||
288 | err_request_irq: | ||
289 | gpio_free(gpio_cd); | ||
290 | err_request_cd: | ||
291 | return err; | ||
292 | } | ||
293 | |||
294 | static void littleton_mci_exit(struct device *dev, void *data) | ||
295 | { | ||
296 | int gpio_cd = GPIO_MMC1_CARD_DETECT; | ||
297 | |||
298 | free_irq(gpio_to_irq(gpio_cd), data); | ||
299 | gpio_free(gpio_cd); | ||
300 | } | ||
301 | |||
302 | static struct pxamci_platform_data littleton_mci_platform_data = { | 268 | static struct pxamci_platform_data littleton_mci_platform_data = { |
303 | .detect_delay = 20, | 269 | .detect_delay = 20, |
304 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 270 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
305 | .init = littleton_mci_init, | 271 | .gpio_card_detect = GPIO_MMC1_CARD_DETECT, |
306 | .exit = littleton_mci_exit, | 272 | .gpio_card_ro = -1, |
273 | .gpio_power = -1, | ||
307 | }; | 274 | }; |
308 | 275 | ||
309 | static void __init littleton_init_mmc(void) | 276 | static void __init littleton_init_mmc(void) |