From patchwork Fri Nov 23 03:41:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13106 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 4BCEE23FC1 for ; Fri, 23 Nov 2012 03:48:23 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id D43F4A19E6C for ; Fri, 23 Nov 2012 03:48:22 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1335312ieb.11 for ; Thu, 22 Nov 2012 19:48:22 -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=u15qcggUIZD6P8Ob8nsyj0uMxIbbppSuq1rPayGlVA8=; b=n7lYW2YBfVpWERL2+i8y4usjxZr9b6FSyooHR5F2Dh5+0O9IGAoWEwfHXHfIk3gpnZ 7dO9mn+QGPBXhwA+Q/1NTl554cdxyBQNW21lLUAW9VnDymuz1AJaNL/tSYFADLV2yA++ eaexKWZitMfboa+HjkDr6Kh7XEhznZ1IDCtmpbIp6fDyMccPx99tWW6rFzUJ2o/m7AR4 IStQjqO92P1vwIIfmqUmSfwETi3+cPuaJcrK9DHZk3yc7K8KrqvOF7mQM2uSTcdDov4M No6D1r7Z1Cj9hdIk+VEqK2BOI4W5ye+cpdaCXK0mlTOr5EopZw8FuKRw8Mb32tOCdCuH qjDg== Received: by 10.50.186.199 with SMTP id fm7mr2296958igc.62.1353642502603; Thu, 22 Nov 2012 19:48:22 -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 n20csp296282igt; Thu, 22 Nov 2012 19:48:22 -0800 (PST) Received: by 10.68.253.232 with SMTP id ad8mr10474848pbd.73.1353642502049; Thu, 22 Nov 2012 19:48:22 -0800 (PST) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id h2si6790733pay.222.2012.11.22.19.48.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 19:48:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.51; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.51 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-pb0-f51.google.com with SMTP id ro12so3803810pbb.10 for ; Thu, 22 Nov 2012 19:48:21 -0800 (PST) Received: by 10.66.78.4 with SMTP id x4mr6793352paw.60.1353642501819; Thu, 22 Nov 2012 19:48:21 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id x8sm2937337paw.16.2012.11.22.19.48.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 19:48:21 -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 1/5] drm/exynos: Use devm_clk_get in exynos_drm_fimd.c Date: Fri, 23 Nov 2012 09:11:55 +0530 Message-Id: <1353642119-10253-2-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: ALoCoQnSF2s+DM21pJoZ08JMYE3eTGj9Pl6PoumOtKxUC4N0Utmbn4jnNs7WohReLBqNLHhJDEOc 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_fimd.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index ad04edd..57851cc 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -846,14 +846,14 @@ static int __devinit fimd_probe(struct platform_device *pdev) if (!ctx) return -ENOMEM; - ctx->bus_clk = clk_get(dev, "fimd"); + ctx->bus_clk = devm_clk_get(dev, "fimd"); if (IS_ERR(ctx->bus_clk)) { dev_err(dev, "failed to get bus clock\n"); ret = PTR_ERR(ctx->bus_clk); goto err_clk_get; } - ctx->lcd_clk = clk_get(dev, "sclk_fimd"); + ctx->lcd_clk = devm_clk_get(dev, "sclk_fimd"); if (IS_ERR(ctx->lcd_clk)) { dev_err(dev, "failed to get lcd clock\n"); ret = PTR_ERR(ctx->lcd_clk); @@ -918,11 +918,9 @@ static int __devinit fimd_probe(struct platform_device *pdev) err_clk: clk_disable(ctx->lcd_clk); - clk_put(ctx->lcd_clk); err_bus_clk: clk_disable(ctx->bus_clk); - clk_put(ctx->bus_clk); err_clk_get: return ret; @@ -949,9 +947,6 @@ static int __devexit fimd_remove(struct platform_device *pdev) out: pm_runtime_disable(dev); - clk_put(ctx->lcd_clk); - clk_put(ctx->bus_clk); - return 0; }