From patchwork Wed May 22 12:14:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seung-Woo Kim X-Patchwork-Id: 2601551 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 012563FD2B for ; Wed, 22 May 2013 12:19:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B979CE6350 for ; Wed, 22 May 2013 05:19:03 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id B69BCE6361 for ; Wed, 22 May 2013 05:14:15 -0700 (PDT) Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MN7006008NPGH40@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 22 May 2013 21:14:13 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id C5.04.29708.596BC915; Wed, 22 May 2013 21:14:13 +0900 (KST) X-AuditID: cbfee690-b7f6f6d00000740c-71-519cb69558af Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id E4.07.16109.596BC915; Wed, 22 May 2013 21:14:13 +0900 (KST) Received: from localhost.localdomain ([10.90.8.56]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MN700GSA8NNB920@mmp2.samsung.com>; Wed, 22 May 2013 21:14:13 +0900 (KST) From: Seung-Woo Kim To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH 4/4] drm/exynos: replace request_threaded_irq with devm function Date: Wed, 22 May 2013 21:14:17 +0900 Message-id: <1369224857-18661-5-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 In-reply-to: <1369224857-18661-1-git-send-email-sw0312.kim@samsung.com> References: <1369224857-18661-1-git-send-email-sw0312.kim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCLMWRmVeSWpSXmKPExsWyRsSkRHfqtjmBBkcuaFv0njvJZHHl63s2 i0n3J7BYnG16w24xY/JLNgdWj+3fHrB63O8+zuTRt2UVYwBzFJdNSmpOZllqkb5dAlfGgk3H 2QuealR8vNDE0sD4TbGLkZNDQsBEYta9HewQtpjEhXvr2boYuTiEBJYySszoWcMOU3SpcQ0T RGI6o8Shh0+ZIZxmJokjV1Ywg1SxCehI7F/ymxXEFhGwlHiw9TdYnFnAXaL55TGwuLBAgMS3 pUdZQGwWAVWJJ3t7wOK8Am4S7U8fsUJsU5BYcO8tG4jNCdQ779htsCuEgGq+f7rGArJYQuA/ m8Sdq7/ZIAYJSHybfAgowQGUkJXYdIAZYo6kxMEVN1gmMAovYGRYxSiaWpBcUJyUXmSiV5yY W1yal66XnJ+7iREYwqf/PZuwg/HeAetDjMlA4yYyS4km5wNjIK8k3tDYzMjC1MTU2Mjc0ow0 YSVxXvUW60AhgfTEktTs1NSC1KL4otKc1OJDjEwcnFINjCErjv2/7Wi5OHTqerlN33grUmxC HaRuP614Y6Vb+f/JhlcsOUuvdoQ/dmhKkYx3YJ+R9zdA+fn9y8v7zkr5N4TK8qxaO7f99uc3 uRwrN7IWOzY8epxTNTGa9c1ajhl/pS9ftjGbrF4wlXFpgnZsjKfYycNua57NmJ7mJiB/ITtX 5dZ1rZfvS5VYijMSDbWYi4oTAfrRbd93AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsVy+t9jQd2p2+YEGkz7pGzRe+4kk8WVr+/Z LCbdn8BicbbpDbvFjMkv2RxYPbZ/e8Dqcb/7OJNH35ZVjAHMUQ2MNhmpiSmpRQqpecn5KZl5 6bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlAS5UUyhJzSoFCAYnFxUr6dpgmhIa4 6VrANEbo+oYEwfUYGaCBhDWMGQs2HWcveKpR8fFCE0sD4zfFLkZODgkBE4lLjWuYIGwxiQv3 1rN1MXJxCAlMZ5Q49PApM4TTzCRx5MoKZpAqNgEdif1LfrOC2CIClhIPtv4GizMLuEs0vzwG FhcWCJD4tvQoC4jNIqAq8WRvD1icV8BNov3pI1aIbQoSC+69ZQOxOYF65x27zQ5iCwHVfP90 jWUCI+8CRoZVjKKpBckFxUnpuYZ6xYm5xaV56XrJ+bmbGMER8kxqB+PKBotDjAIcjEo8vA9q ZwcKsSaWFVfmHmKU4GBWEuFVCJoTKMSbklhZlVqUH19UmpNafIgxGeiqicxSosn5wOjNK4k3 NDYxM7I0Mje0MDI2J01YSZz3QKt1oJBAemJJanZqakFqEcwWJg5OqQbGg5O7DvFvVDhw4SKL gctT4Q3WpgzJAWcNL2lNPX8g5++0BW53FWV6tFjX9Z6P9Weyq3GtkntYozulXOvvwU2+hx+u bpmwgP2XcHNj+r5PW5M+rz5w21PJOsJO52dp4Ouyo4ViQm8N7jz6fmtvyvoEZ5ad4m6z+GLO CJ29dTNy2r1zmTP21ZqtUmIpzkg01GIuKk4EAJX7WDnUAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org devm_request_threaded_irq is used instead of request_threaded_irq and free_irq is removed. Signed-off-by: Seung-Woo Kim --- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 8 ++------ drivers/gpu/drm/exynos/exynos_drm_gsc.c | 8 ++------ drivers/gpu/drm/exynos/exynos_drm_rotator.c | 11 +++-------- drivers/gpu/drm/exynos/exynos_hdmi.c | 7 +------ 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 75c50f5..4a1616a 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) } 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; } diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 98032d6..762f40d 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) } 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; } diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 3aa502a..9b6c709 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) 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; } diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 8d5dcd1..2f78532 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) 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 */