Commit dcb9a7c7 authored by Seung-Woo Kim's avatar Seung-Woo Kim Committed by Inki Dae

drm/exynos: replace request_threaded_irq with devm function

devm_request_threaded_irq is used instead of request_threaded_irq
and free_irq is removed.
Signed-off-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 7a1b00e0
...@@ -1845,7 +1845,7 @@ static int fimc_probe(struct platform_device *pdev) ...@@ -1845,7 +1845,7 @@ static int fimc_probe(struct platform_device *pdev)
} }
ctx->irq = res->start; 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); IRQF_ONESHOT, "drm_fimc", ctx);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "failed to request irq.\n"); dev_err(dev, "failed to request irq.\n");
...@@ -1854,7 +1854,7 @@ static int fimc_probe(struct platform_device *pdev) ...@@ -1854,7 +1854,7 @@ static int fimc_probe(struct platform_device *pdev)
ret = fimc_setup_clocks(ctx); ret = fimc_setup_clocks(ctx);
if (ret < 0) if (ret < 0)
goto err_free_irq; return ret;
ippdrv = &ctx->ippdrv; ippdrv = &ctx->ippdrv;
ippdrv->ops[EXYNOS_DRM_OPS_SRC] = &fimc_src_ops; ippdrv->ops[EXYNOS_DRM_OPS_SRC] = &fimc_src_ops;
...@@ -1892,8 +1892,6 @@ static int fimc_probe(struct platform_device *pdev) ...@@ -1892,8 +1892,6 @@ static int fimc_probe(struct platform_device *pdev)
pm_runtime_disable(dev); pm_runtime_disable(dev);
err_put_clk: err_put_clk:
fimc_put_clocks(ctx); fimc_put_clocks(ctx);
err_free_irq:
free_irq(ctx->irq, ctx);
return ret; return ret;
} }
...@@ -1911,8 +1909,6 @@ static int fimc_remove(struct platform_device *pdev) ...@@ -1911,8 +1909,6 @@ static int fimc_remove(struct platform_device *pdev)
pm_runtime_set_suspended(dev); pm_runtime_set_suspended(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
free_irq(ctx->irq, ctx);
return 0; return 0;
} }
......
...@@ -1704,7 +1704,7 @@ static int gsc_probe(struct platform_device *pdev) ...@@ -1704,7 +1704,7 @@ static int gsc_probe(struct platform_device *pdev)
} }
ctx->irq = res->start; 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); IRQF_ONESHOT, "drm_gsc", ctx);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "failed to request irq.\n"); dev_err(dev, "failed to request irq.\n");
...@@ -1725,7 +1725,7 @@ static int gsc_probe(struct platform_device *pdev) ...@@ -1725,7 +1725,7 @@ static int gsc_probe(struct platform_device *pdev)
ret = gsc_init_prop_list(ippdrv); ret = gsc_init_prop_list(ippdrv);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "failed to init property list.\n"); 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, 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) ...@@ -1749,8 +1749,6 @@ static int gsc_probe(struct platform_device *pdev)
err_ippdrv_register: err_ippdrv_register:
pm_runtime_disable(dev); pm_runtime_disable(dev);
err_get_irq:
free_irq(ctx->irq, ctx);
return ret; return ret;
} }
...@@ -1766,8 +1764,6 @@ static int gsc_remove(struct platform_device *pdev) ...@@ -1766,8 +1764,6 @@ static int gsc_remove(struct platform_device *pdev)
pm_runtime_set_suspended(dev); pm_runtime_set_suspended(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
free_irq(ctx->irq, ctx);
return 0; return 0;
} }
......
...@@ -666,8 +666,8 @@ static int rotator_probe(struct platform_device *pdev) ...@@ -666,8 +666,8 @@ static int rotator_probe(struct platform_device *pdev)
return rot->irq; return rot->irq;
} }
ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, ret = devm_request_threaded_irq(dev, rot->irq, NULL,
IRQF_ONESHOT, "drm_rotator", rot); rotator_irq_handler, IRQF_ONESHOT, "drm_rotator", rot);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "failed to request irq\n"); dev_err(dev, "failed to request irq\n");
return ret; return ret;
...@@ -676,8 +676,7 @@ static int rotator_probe(struct platform_device *pdev) ...@@ -676,8 +676,7 @@ static int rotator_probe(struct platform_device *pdev)
rot->clock = devm_clk_get(dev, "rotator"); rot->clock = devm_clk_get(dev, "rotator");
if (IS_ERR(rot->clock)) { if (IS_ERR(rot->clock)) {
dev_err(dev, "failed to get clock\n"); dev_err(dev, "failed to get clock\n");
ret = PTR_ERR(rot->clock); return PTR_ERR(rot->clock);
goto err_clk_get;
} }
pm_runtime_enable(dev); pm_runtime_enable(dev);
...@@ -710,8 +709,6 @@ static int rotator_probe(struct platform_device *pdev) ...@@ -710,8 +709,6 @@ static int rotator_probe(struct platform_device *pdev)
err_ippdrv_register: err_ippdrv_register:
pm_runtime_disable(dev); pm_runtime_disable(dev);
err_clk_get:
free_irq(rot->irq, rot);
return ret; return ret;
} }
...@@ -725,8 +722,6 @@ static int rotator_remove(struct platform_device *pdev) ...@@ -725,8 +722,6 @@ static int rotator_remove(struct platform_device *pdev)
pm_runtime_disable(dev); pm_runtime_disable(dev);
free_irq(rot->irq, rot);
return 0; return 0;
} }
......
...@@ -2046,7 +2046,7 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -2046,7 +2046,7 @@ static int hdmi_probe(struct platform_device *pdev)
hdata->hpd = gpio_get_value(hdata->hpd_gpio); 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 | hdmi_irq_thread, IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING | IRQF_ONESHOT, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
"hdmi", drm_hdmi_ctx); "hdmi", drm_hdmi_ctx);
...@@ -2075,16 +2075,11 @@ static int hdmi_probe(struct platform_device *pdev) ...@@ -2075,16 +2075,11 @@ static int hdmi_probe(struct platform_device *pdev)
static int hdmi_remove(struct platform_device *pdev) static int hdmi_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; 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__); DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
pm_runtime_disable(dev); pm_runtime_disable(dev);
free_irq(hdata->irq, ctx);
/* hdmiphy i2c driver */ /* hdmiphy i2c driver */
i2c_del_driver(&hdmiphy_driver); i2c_del_driver(&hdmiphy_driver);
/* DDC i2c driver */ /* DDC i2c driver */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment