From patchwork Mon Dec 24 08:33:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13690 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B6CD223EC8 for ; Mon, 24 Dec 2012 08:42:26 +0000 (UTC) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by fiordland.canonical.com (Postfix) with ESMTP id 733DEA18DC6 for ; Mon, 24 Dec 2012 08:42:26 +0000 (UTC) Received: by mail-vc0-f175.google.com with SMTP id fy7so7115156vcb.6 for ; Mon, 24 Dec 2012 00:42:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=Fn+RQUxnCyMakFun6g/mcy2HozRnoe8sMhRgy4wYXeg=; b=gbRisc3omPzJ9sIjrZoSecZ1uIBegBITznzo/AjQvkn9xPbSDjjUT2Qo0rYi1sd1JS Nseft+fnkNLot8uBJNu5/zQrUBaPCDCH9tFpxslX4O/qMhOaOG9syf1siedWeEjvjB3z BNskuzRNAlXhuh4kUdMfGkQHgrWmMe+n75QKr618xJnef3mTuZR4pYbgY7nz+espZ89b KxfRB4fpjL/iYz4cAZ/FLZbWCS35kMjyNDsgeCi+xp0jcJf4blonQDg3H7fRrPscYZvq XICoUZVbsRZ9hpFbZhMfzQYHzJIeozzS1JCFeKlVOCW7kyKPep2dazwjDioxXH0iUgrB laCA== X-Received: by 10.52.18.147 with SMTP id w19mr27894439vdd.94.1356338545975; Mon, 24 Dec 2012 00:42:25 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.49.133 with SMTP id u5csp184123ven; Mon, 24 Dec 2012 00:42:25 -0800 (PST) X-Received: by 10.66.75.66 with SMTP id a2mr61105806paw.65.1356338545020; Mon, 24 Dec 2012 00:42:25 -0800 (PST) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id e5si20166993pax.261.2012.12.24.00.42.24 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Dec 2012 00:42:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.52; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f52.google.com with SMTP id fb1so3956557pad.11 for ; Mon, 24 Dec 2012 00:42:24 -0800 (PST) X-Received: by 10.69.1.65 with SMTP id be1mr22351330pbd.66.1356338544568; Mon, 24 Dec 2012 00:42:24 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv8sm11959096pbc.26.2012.12.24.00.42.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Dec 2012 00:42:24 -0800 (PST) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Cc: inki.dae@samsung.com, sachin.kamat@linaro.org, patches@linaro.org, airlied@linux.ie, Eunchul Kim Subject: [PATCH 07/10] drm/exynos: Use devm_clk_get in exynos_drm_rotator.c Date: Mon, 24 Dec 2012 14:03:48 +0530 Message-Id: <1356338031-23674-8-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org> References: <1356338031-23674-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlZC8P+m6w35+dppt0aL99M2c3RzqC8UDGjWSG7mKOUbqPnOFPBBZOOd3yjeOxiwRbJcbfh This eliminates the need for explicit clk_put and makes the cleanup and exit path code simpler. Cc: Eunchul Kim Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 4505163..484c6bd 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c @@ -674,7 +674,7 @@ static int __devinit rotator_probe(struct platform_device *pdev) return ret; } - rot->clock = clk_get(dev, "rotator"); + rot->clock = devm_clk_get(dev, "rotator"); if (IS_ERR_OR_NULL(rot->clock)) { dev_err(dev, "failed to get clock\n"); ret = PTR_ERR(rot->clock); @@ -712,7 +712,6 @@ static int __devinit rotator_probe(struct platform_device *pdev) err_ippdrv_register: devm_kfree(dev, ippdrv->prop_list); pm_runtime_disable(dev); - clk_put(rot->clock); err_clk_get: free_irq(rot->irq, rot); return ret; @@ -728,7 +727,6 @@ static int __devexit rotator_remove(struct platform_device *pdev) exynos_drm_ippdrv_unregister(ippdrv); pm_runtime_disable(dev); - clk_put(rot->clock); free_irq(rot->irq, rot);