mmc: omap_hsmmc: use devm_request_threaded_irq
authorBalaji T K <balajitk@ti.com>
Fri, 9 May 2014 16:46:50 +0000 (22:16 +0530)
committerChris Ball <chris@printf.net>
Thu, 22 May 2014 12:40:42 +0000 (08:40 -0400)
With devm_request_threaded_irq conversion free_irq can be removed
in clean up path

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/omap_hsmmc.c

index ef7e48a7ce0cc012a9455077522b45404e304947..6179fe3ef8ca924d9945c70a9865ed9f92ec8acb 100644 (file)
@@ -2043,9 +2043,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 
        /* Request IRQ for card detect */
        if ((mmc_slot(host).card_detect_irq)) {
-               ret = request_threaded_irq(mmc_slot(host).card_detect_irq,
-                                          NULL,
-                                          omap_hsmmc_detect,
+               ret = devm_request_threaded_irq(&pdev->dev,
+                                               mmc_slot(host).card_detect_irq,
+                                               NULL, omap_hsmmc_detect,
                                           IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
                                           mmc_hostname(mmc), host);
                if (ret) {
@@ -2088,7 +2088,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 
 err_slot_name:
        mmc_remove_host(mmc);
-       free_irq(mmc_slot(host).card_detect_irq, host);
 err_irq_cd:
        if (host->use_reg)
                omap_hsmmc_reg_put(host);
@@ -2127,8 +2126,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
                omap_hsmmc_reg_put(host);
        if (host->pdata->cleanup)
                host->pdata->cleanup(&pdev->dev);
-       if (mmc_slot(host).card_detect_irq)
-               free_irq(mmc_slot(host).card_detect_irq, host);
 
        if (host->tx_chan)
                dma_release_channel(host->tx_chan);
This page took 0.026883 seconds and 5 git commands to generate.