aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2013-05-22 08:14:17 -0400
committerInki Dae <inki.dae@samsung.com>2013-05-23 06:48:40 -0400
commitdcb9a7c74acf59679a537e6fcc7a99c12353e7b8 (patch)
treea2bf7e385ecd479412595f87db6dcd7d966a2e02
parent7a1b00e0728ff20d6c8e2d6335da05d13d03ef74 (diff)
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: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimc.c8
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gsc.c8
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_rotator.c11
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c7
4 files changed, 8 insertions, 26 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 75c50f5fe0ed..4a1616a18ab7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1845,7 +1845,7 @@ static int fimc_probe(struct platform_device *pdev)
1845 } 1845 }
1846 1846
1847 ctx->irq = res->start; 1847 ctx->irq = res->start;
1848 ret = request_threaded_irq(ctx->irq, NULL, fimc_irq_handler, 1848 ret = devm_request_threaded_irq(dev, ctx->irq, NULL, fimc_irq_handler,
1849 IRQF_ONESHOT, "drm_fimc", ctx); 1849 IRQF_ONESHOT, "drm_fimc", ctx);
1850 if (ret < 0) { 1850 if (ret < 0) {
1851 dev_err(dev, "failed to request irq.\n"); 1851 dev_err(dev, "failed to request irq.\n");
@@ -1854,7 +1854,7 @@ static int fimc_probe(struct platform_device *pdev)
1854 1854
1855 ret = fimc_setup_clocks(ctx); 1855 ret = fimc_setup_clocks(ctx);
1856 if (ret < 0) 1856 if (ret < 0)
1857 goto err_free_irq; 1857 return ret;
1858 1858
1859 ippdrv = &ctx->ippdrv; 1859 ippdrv = &ctx->ippdrv;
1860 ippdrv->ops[EXYNOS_DRM_OPS_SRC] = &fimc_src_ops; 1860 ippdrv->ops[EXYNOS_DRM_OPS_SRC] = &fimc_src_ops;
@@ -1892,8 +1892,6 @@ err_pm_dis:
1892 pm_runtime_disable(dev); 1892 pm_runtime_disable(dev);
1893err_put_clk: 1893err_put_clk:
1894 fimc_put_clocks(ctx); 1894 fimc_put_clocks(ctx);
1895err_free_irq:
1896 free_irq(ctx->irq, ctx);
1897 1895
1898 return ret; 1896 return ret;
1899} 1897}
@@ -1911,8 +1909,6 @@ static int fimc_remove(struct platform_device *pdev)
1911 pm_runtime_set_suspended(dev); 1909 pm_runtime_set_suspended(dev);
1912 pm_runtime_disable(dev); 1910 pm_runtime_disable(dev);
1913 1911
1914 free_irq(ctx->irq, ctx);
1915
1916 return 0; 1912 return 0;
1917} 1913}
1918 1914
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 98032d6c62c3..762f40d548b7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1704,7 +1704,7 @@ static int gsc_probe(struct platform_device *pdev)
1704 } 1704 }
1705 1705
1706 ctx->irq = res->start; 1706 ctx->irq = res->start;
1707 ret = request_threaded_irq(ctx->irq, NULL, gsc_irq_handler, 1707 ret = devm_request_threaded_irq(dev, ctx->irq, NULL, gsc_irq_handler,
1708 IRQF_ONESHOT, "drm_gsc", ctx); 1708 IRQF_ONESHOT, "drm_gsc", ctx);
1709 if (ret < 0) { 1709 if (ret < 0) {
1710 dev_err(dev, "failed to request irq.\n"); 1710 dev_err(dev, "failed to request irq.\n");
@@ -1725,7 +1725,7 @@ static int gsc_probe(struct platform_device *pdev)
1725 ret = gsc_init_prop_list(ippdrv); 1725 ret = gsc_init_prop_list(ippdrv);
1726 if (ret < 0) { 1726 if (ret < 0) {
1727 dev_err(dev, "failed to init property list.\n"); 1727 dev_err(dev, "failed to init property list.\n");
1728 goto err_get_irq; 1728 return ret;
1729 } 1729 }
1730 1730
1731 DRM_DEBUG_KMS("%s:id[%d]ippdrv[0x%x]\n", __func__, ctx->id, 1731 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 1749
1750err_ippdrv_register: 1750err_ippdrv_register:
1751 pm_runtime_disable(dev); 1751 pm_runtime_disable(dev);
1752err_get_irq:
1753 free_irq(ctx->irq, ctx);
1754 return ret; 1752 return ret;
1755} 1753}
1756 1754
@@ -1766,8 +1764,6 @@ static int gsc_remove(struct platform_device *pdev)
1766 pm_runtime_set_suspended(dev); 1764 pm_runtime_set_suspended(dev);
1767 pm_runtime_disable(dev); 1765 pm_runtime_disable(dev);
1768 1766
1769 free_irq(ctx->irq, ctx);
1770
1771 return 0; 1767 return 0;
1772} 1768}
1773 1769
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 3aa502a6cf21..9b6c70964d71 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -666,8 +666,8 @@ static int rotator_probe(struct platform_device *pdev)
666 return rot->irq; 666 return rot->irq;
667 } 667 }
668 668
669 ret = request_threaded_irq(rot->irq, NULL, rotator_irq_handler, 669 ret = devm_request_threaded_irq(dev, rot->irq, NULL,
670 IRQF_ONESHOT, "drm_rotator", rot); 670 rotator_irq_handler, IRQF_ONESHOT, "drm_rotator", rot);
671 if (ret < 0) { 671 if (ret < 0) {
672 dev_err(dev, "failed to request irq\n"); 672 dev_err(dev, "failed to request irq\n");
673 return ret; 673 return ret;
@@ -676,8 +676,7 @@ static int rotator_probe(struct platform_device *pdev)
676 rot->clock = devm_clk_get(dev, "rotator"); 676 rot->clock = devm_clk_get(dev, "rotator");
677 if (IS_ERR(rot->clock)) { 677 if (IS_ERR(rot->clock)) {
678 dev_err(dev, "failed to get clock\n"); 678 dev_err(dev, "failed to get clock\n");
679 ret = PTR_ERR(rot->clock); 679 return PTR_ERR(rot->clock);
680 goto err_clk_get;
681 } 680 }
682 681
683 pm_runtime_enable(dev); 682 pm_runtime_enable(dev);
@@ -710,8 +709,6 @@ static int rotator_probe(struct platform_device *pdev)
710 709
711err_ippdrv_register: 710err_ippdrv_register:
712 pm_runtime_disable(dev); 711 pm_runtime_disable(dev);
713err_clk_get:
714 free_irq(rot->irq, rot);
715 return ret; 712 return ret;
716} 713}
717 714
@@ -725,8 +722,6 @@ static int rotator_remove(struct platform_device *pdev)
725 722
726 pm_runtime_disable(dev); 723 pm_runtime_disable(dev);
727 724
728 free_irq(rot->irq, rot);
729
730 return 0; 725 return 0;
731} 726}
732 727
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 8d5dcd15e150..2f785325d6de 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2046,7 +2046,7 @@ static int hdmi_probe(struct platform_device *pdev)
2046 2046
2047 hdata->hpd = gpio_get_value(hdata->hpd_gpio); 2047 hdata->hpd = gpio_get_value(hdata->hpd_gpio);
2048 2048
2049 ret = request_threaded_irq(hdata->irq, NULL, 2049 ret = devm_request_threaded_irq(dev, hdata->irq, NULL,
2050 hdmi_irq_thread, IRQF_TRIGGER_RISING | 2050 hdmi_irq_thread, IRQF_TRIGGER_RISING |
2051 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 2051 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
2052 "hdmi", drm_hdmi_ctx); 2052 "hdmi", drm_hdmi_ctx);
@@ -2075,16 +2075,11 @@ err_ddc:
2075static int hdmi_remove(struct platform_device *pdev) 2075static int hdmi_remove(struct platform_device *pdev)
2076{ 2076{
2077 struct device *dev = &pdev->dev; 2077 struct device *dev = &pdev->dev;
2078 struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev);
2079 struct hdmi_context *hdata = ctx->ctx;
2080 2078
2081 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); 2079 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
2082 2080
2083 pm_runtime_disable(dev); 2081 pm_runtime_disable(dev);
2084 2082
2085 free_irq(hdata->irq, ctx);
2086
2087
2088 /* hdmiphy i2c driver */ 2083 /* hdmiphy i2c driver */
2089 i2c_del_driver(&hdmiphy_driver); 2084 i2c_del_driver(&hdmiphy_driver);
2090 /* DDC i2c driver */ 2085 /* DDC i2c driver */