mmc: omap_hsmmc: use devm_request_irq
authorBalaji T K <balajitk@ti.com>
Fri, 9 May 2014 16:46:49 +0000 (22:16 +0530)
committerChris Ball <chris@printf.net>
Thu, 22 May 2014 12:40:41 +0000 (08:40 -0400)
With devm_request_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 b8ae7ee0f3af409e752a4ec4ed642e18207da140..ef7e48a7ce0cc012a9455077522b45404e304947 100644 (file)
@@ -2017,7 +2017,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
        }
 
        /* Request IRQ for MMC operations */
-       ret = request_irq(host->irq, omap_hsmmc_irq, 0,
+       ret = devm_request_irq(&pdev->dev, host->irq, omap_hsmmc_irq, 0,
                        mmc_hostname(mmc), host);
        if (ret) {
                dev_err(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n");
@@ -2028,7 +2028,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
                if (pdata->init(&pdev->dev) != 0) {
                        dev_err(mmc_dev(host->mmc),
                                "Unable to configure MMC IRQs\n");
-                       goto err_irq_cd_init;
+                       goto err_irq;
                }
        }
 
@@ -2095,8 +2095,6 @@ err_irq_cd:
 err_reg:
        if (host->pdata->cleanup)
                host->pdata->cleanup(&pdev->dev);
-err_irq_cd_init:
-       free_irq(host->irq, host);
 err_irq:
        if (host->tx_chan)
                dma_release_channel(host->tx_chan);
@@ -2129,7 +2127,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
                omap_hsmmc_reg_put(host);
        if (host->pdata->cleanup)
                host->pdata->cleanup(&pdev->dev);
-       free_irq(host->irq, host);
        if (mmc_slot(host).card_detect_irq)
                free_irq(mmc_slot(host).card_detect_irq, host);