From patchwork Fri Nov 23 03:41:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13109 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 A316323FC1 for ; Fri, 23 Nov 2012 03:48:34 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5422BA181DF for ; Fri, 23 Nov 2012 03:48:34 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so3535411iag.11 for ; Thu, 22 Nov 2012 19:48:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=4bIJvrtTAwTWnAx6gQWWix7cAVzTAS4LHgSRlhxvwQY=; b=W9LuzXgYoNEvjGpTtXyl87+et1AILWlGlUtVYtIhkMpLoCumWWB+MfUgGrojIXKoQd RzY9DqpX8KGIgKz0URkgsirEdougscnsEUsgfYFwIlYcr3TRr4inc0miSAXkSSKsa8c3 3rdj+eEDGbrCs/JO8BNuhp44frf6GuXhagjNS0z6nv/UTCBasbibIXs4rUe7q+Jfhg50 mR2p7WdHQTe4p5vwEbyD00zutlQJpt0n0ZgGS+xEPRvtemCq260uOc9w9A4dtvKpvOHn 125w9VSR2EMUBbHtMcAMEGMPFp+swCj80gKH04eKQ6fWW2DWBT8pBkFeEc0jErj/sril ExgQ== Received: by 10.50.91.195 with SMTP id cg3mr4980476igb.57.1353642513688; Thu, 22 Nov 2012 19:48:33 -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.50.67.148 with SMTP id n20csp296298igt; Thu, 22 Nov 2012 19:48:33 -0800 (PST) Received: by 10.68.253.232 with SMTP id ad8mr10475908pbd.73.1353642512965; Thu, 22 Nov 2012 19:48:32 -0800 (PST) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id yl9si7319845pbc.122.2012.11.22.19.48.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 19:48:32 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.42 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-f42.google.com with SMTP id rl6so3258806pac.1 for ; Thu, 22 Nov 2012 19:48:32 -0800 (PST) Received: by 10.68.248.74 with SMTP id yk10mr10599752pbc.86.1353642512748; Thu, 22 Nov 2012 19:48:32 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id x8sm2937337paw.16.2012.11.22.19.48.29 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 19:48:32 -0800 (PST) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Cc: inki.dae@samsung.com, jy0922.shim@samsung.com, airlied@linux.ie, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 4/5] drm/exynos: Use devm_clk_get in exynos_drm_g2d.c Date: Fri, 23 Nov 2012 09:11:58 +0530 Message-Id: <1353642119-10253-5-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353642119-10253-1-git-send-email-sachin.kamat@linaro.org> References: <1353642119-10253-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkAXslhyLuHttK4cjWb6RasMaBhZbLgZJPsBdV1lKjeswPJGUK9XI/VOTBEIL7qu9nGMYa1 devm_clk_get is device managed and makes error handling and exit code simpler. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index a9002ad..c1054cb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -1125,7 +1125,7 @@ static int __devinit g2d_probe(struct platform_device *pdev) mutex_init(&g2d->cmdlist_mutex); mutex_init(&g2d->runqueue_mutex); - g2d->gate_clk = clk_get(dev, "fimg2d"); + g2d->gate_clk = devm_clk_get(dev, "fimg2d"); if (IS_ERR(g2d->gate_clk)) { dev_err(dev, "failed to get gate clock\n"); ret = PTR_ERR(g2d->gate_clk); @@ -1181,7 +1181,6 @@ static int __devinit g2d_probe(struct platform_device *pdev) err_put_clk: pm_runtime_disable(dev); - clk_put(g2d->gate_clk); err_destroy_workqueue: destroy_workqueue(g2d->g2d_workq); err_destroy_slab: @@ -1202,7 +1201,6 @@ static int __devexit g2d_remove(struct platform_device *pdev) } pm_runtime_disable(&pdev->dev); - clk_put(g2d->gate_clk); g2d_fini_cmdlist(g2d); destroy_workqueue(g2d->g2d_workq);