drm/exynos: replace request_threaded_irq with devm function
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 22 May 2013 12:14:17 +0000 (21:14 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 23 May 2013 10:48:40 +0000 (19:48 +0900)
devm_request_threaded_irq is used instead of request_threaded_irq
and free_irq is removed.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fimc.c
drivers/gpu/drm/exynos/exynos_drm_gsc.c
drivers/gpu/drm/exynos/exynos_drm_rotator.c
drivers/gpu/drm/exynos/exynos_hdmi.c

index 75c50f5fe0eda40d6efc038cdbedce647375c2d7..4a1616a18ab7e9ff019ed4b6f50212789a78126a 100644 (file)
@@ -1845,7 +1845,7 @@ static int fimc_probe(struct platform_device *pdev)
        }
 
        ctx->irq = res->start;
-       ret = request_threaded_irq(ctx->irq, NULL, fimc_irq_handler,
+       ret = devm_request_threaded_irq(dev, ctx->irq, NULL, fimc_irq_handler,
                IRQF_ONESHOT, "drm_fimc", ctx);
        if (ret < 0) {
                dev_err(dev, "failed to request irq.\n");
@@ -1854,7 +1854,7 @@ static int fimc_probe(struct platform_device *pdev)
 
        ret = fimc_setup_clocks(ctx);
        if (ret < 0)
-               goto err_free_irq;
+               return ret;
 
        ippdrv = &ctx->ippdrv;
        ippdrv->ops[EXYNOS_DRM_OPS_SRC] = &fimc_src_ops;
@@ -1892,8 +1892,6 @@ err_pm_dis:
        pm_runtime_disable(dev);
 err_put_clk:
        fimc_put_clocks(ctx);
-err_free_irq:
-       free_irq(ctx->irq, ctx);
 
        return ret;
 }
@@ -1911,8 +1909,6 @@ static int fimc_remove(struct platform_device *pdev)
        pm_runtime_set_suspended(dev);
        pm_runtime_disable(dev);
 
-       free_irq(ctx->irq, ctx);
-
        return 0;
 }
 
index 98032d6c62c3a2f0cb347d7691b465a090ff7310..762f40d548b76398904480f839b1741721aca2b9 100644 (file)
@@ -1704,7 +1704,7 @@ static int gsc_probe(struct platform_device *pdev)
        }
 
        ctx->irq = res->start;
-       ret = request_threaded_irq(ctx->irq, NULL, gsc_irq_handler,
+       ret = devm_request_threaded_irq(dev, ctx->irq, NULL, gsc_irq_handler,
                IRQF_ONESHOT, "drm_gsc", ctx);
        if (ret < 0) {
                dev_err(dev, "failed to request irq.\n");
@@ -1725,7 +1725,7 @@ static int gsc_probe(struct platform_device *pdev)
        ret = gsc_init_prop_list(ippdrv);
        if (ret < 0) {
                dev_err(dev, "failed to init property list.\n");
-               goto err_get_irq;
+               return ret;
        }
 
        DRM_DEBUG_KMS("%s:id[%d]ippdrv[0x%x]\n", __func__, ctx->id,
@@ -1749,8 +1749,6 @@ static int gsc_probe(struct platform_device *pdev)
 
 err_ippdrv_register:
        pm_runtime_disable(dev);
-err_get_irq:
-       free_irq(ctx->irq, ctx);
        return ret;
 }
 
@@ -1766,8 +1764,6 @@ static int gsc_remove(struct platform_device *pdev)
        pm_runtime_set_suspended(dev);
        pm_runtime_disable(dev);
 
-       free_irq(ctx->irq, ctx);
-
        return 0;
 }
 
index 3aa502a6cf2105b6fb713037c66e17e9c9af5877..9b6c70964d71c969106ed41f5f849979e2094601 100644 (file)
@@ -666,8 +666,8 @@ static int rotator_probe(struct platform_device *pdev)
                return rot->irq;
        }
 
-       ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler,
-                       IRQF_ONESHOT, "drm_rotator", rot);
+       ret = devm_request_threaded_irq(dev, rot->irq, NULL,
+                       rotator_irq_handler, IRQF_ONESHOT, "drm_rotator", rot);
        if (ret < 0) {
                dev_err(dev, "failed to request irq\n");
                return ret;
@@ -676,8 +676,7 @@ static int rotator_probe(struct platform_device *pdev)
        rot->clock = devm_clk_get(dev, "rotator");
        if (IS_ERR(rot->clock)) {
                dev_err(dev, "failed to get clock\n");
-               ret = PTR_ERR(rot->clock);
-               goto err_clk_get;
+               return PTR_ERR(rot->clock);
        }
 
        pm_runtime_enable(dev);
@@ -710,8 +709,6 @@ static int rotator_probe(struct platform_device *pdev)
 
 err_ippdrv_register:
        pm_runtime_disable(dev);
-err_clk_get:
-       free_irq(rot->irq, rot);
        return ret;
 }
 
@@ -725,8 +722,6 @@ static int rotator_remove(struct platform_device *pdev)
 
        pm_runtime_disable(dev);
 
-       free_irq(rot->irq, rot);
-
        return 0;
 }
 
index 8d5dcd15e15089c03224b9197f6d1368d3a85d27..2f785325d6dedacf388910430b529645b6a88473 100644 (file)
@@ -2046,7 +2046,7 @@ static int hdmi_probe(struct platform_device *pdev)
 
        hdata->hpd = gpio_get_value(hdata->hpd_gpio);
 
-       ret = request_threaded_irq(hdata->irq, NULL,
+       ret = devm_request_threaded_irq(dev, hdata->irq, NULL,
                        hdmi_irq_thread, IRQF_TRIGGER_RISING |
                        IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
                        "hdmi", drm_hdmi_ctx);
@@ -2075,16 +2075,11 @@ err_ddc:
 static int hdmi_remove(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev);
-       struct hdmi_context *hdata = ctx->ctx;
 
        DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
 
        pm_runtime_disable(dev);
 
-       free_irq(hdata->irq, ctx);
-
-
        /* hdmiphy i2c driver */
        i2c_del_driver(&hdmiphy_driver);
        /* DDC i2c driver */