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: 1908371 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 0703A40061 for ; Mon, 24 Dec 2012 09:44:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB812E6151 for ; Mon, 24 Dec 2012 01:44:03 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-da0-f41.google.com (mail-da0-f41.google.com [209.85.210.41]) by gabe.freedesktop.org (Postfix) with ESMTP id B10FEE5D26 for ; Mon, 24 Dec 2012 00:42:24 -0800 (PST) Received: by mail-da0-f41.google.com with SMTP id e20so3061948dak.14 for ; Mon, 24 Dec 2012 00:42:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=Fn+RQUxnCyMakFun6g/mcy2HozRnoe8sMhRgy4wYXeg=; b=d1vkYFU3A3BjTCdPvB5r+wk1HwjDhOUi90urr4ocQndnEEw5eOGNTQQUM3pY1t7lzZ V91El4RYKIpDEuYNf7YIGnQSCGGydMqqldZOSkBzZgoG47GaG2DspdWUQxjiswRQHTTT meof93KLMJHWK8yZQLma1E7Ddqja9nmEdIxLgK9diXaxlOb+BzZVI1wGILtPSE6/4L6M Gpi5/PNC0xtizfQ2/KBcbwt5OtK7FCSQydeJlcBQMFNSZT/525hFaXUIa0M+Xf6kxrg5 Kx5qjKtMhcSrtiwUk7KB3wsBCJK1gkgDijT1g4wbM6wWYwWqnChY+q8xeWr2nPKLyN/z MZug== 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 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: ALoCoQn95g1SCDxbU966ShVCz5R7c2hp9tCqIxzZwEiaq29FvwhmUlscJvWtlrhHnDVV0CJl0l5q X-Mailman-Approved-At: Mon, 24 Dec 2012 01:36:57 -0800 Cc: sachin.kamat@linaro.org, patches@linaro.org 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 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);