From patchwork Mon Mar 3 07:43:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3751831 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 713489F1EE for ; Mon, 3 Mar 2014 07:46:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98B56203AC for ; Mon, 3 Mar 2014 07:46:36 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4A89220394 for ; Mon, 3 Mar 2014 07:46:35 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3C39A2656C6; Mon, 3 Mar 2014 08:46:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 42EA12655FF; Mon, 3 Mar 2014 08:43:48 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 503F12655FF; Mon, 3 Mar 2014 08:43:47 +0100 (CET) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by alsa0.perex.cz (Postfix) with ESMTP id E2ABD2655C7 for ; Mon, 3 Mar 2014 08:43:12 +0100 (CET) Received: by mail-pb0-f52.google.com with SMTP id rr13so3449408pbb.11 for ; Sun, 02 Mar 2014 23:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=6eCMRsU6mCm+REUXN94v02G+xNElyFF25hT5WmXvt9A=; b=pE2pl8dh5SmLARylZzbYtt6TyRxmITiucu9xJ/+nwvt2nWYwp+m5DOktMq/SQcOims 9sHT3yMJAEvUs0FQbhKuALJNu01aiQzGQ/yF65YI/4ouKPwmYrHNDhpjcuRlguoI1per sZWCzKCETNcOlQbEFuvj2JGgfcWwDqgknvs/hFlX3L+xxAXcfhODGjnAEYEBhCRFk9Um CnAuyXY0wGS9A6gAR+R6pSRaib4Jt1BuPB7dOYCrYXQ+VLVM+A4hDXuvXDGJeg8XCBq4 Hv5vu9FGhCu+1btmOrJE4vbFuyhvczY6NTrH9feQTdlmY5SUodEqC9FJ4KUJcCx4LYna Me3Q== X-Received: by 10.68.170.36 with SMTP id aj4mr18235110pbc.54.1393832591625; Sun, 02 Mar 2014 23:43:11 -0800 (PST) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id dk1sm33019856pbc.46.2014.03.02.23.43.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 02 Mar 2014 23:43:11 -0800 (PST) Date: Sun, 02 Mar 2014 23:43:11 -0800 (PST) Message-ID: <87vbvvwwvn.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown In-Reply-To: <871tyjybhr.wl%kuninori.morimoto.gx@gmail.com> References: <87d2ib90t9.wl%kuninori.morimoto.gx@gmail.com> <871tyjybhr.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto Subject: [alsa-devel] [PATCH 4/8] ASoC: rsnd: use devm_clk_get() instead of clk_get() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/adg.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 69d9394..a05ad81 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -405,11 +405,11 @@ int rsnd_adg_probe(struct platform_device *pdev, return -ENOMEM; } - clk_orig = clk_get(dev, NULL); - adg->clk[CLKA] = clk_get(dev, "clk_a"); - adg->clk[CLKB] = clk_get(dev, "clk_b"); - adg->clk[CLKC] = clk_get(dev, "clk_c"); - adg->clk[CLKI] = clk_get(dev, "clk_i"); + clk_orig = devm_clk_get(dev, NULL); + adg->clk[CLKA] = devm_clk_get(dev, "clk_a"); + adg->clk[CLKB] = devm_clk_get(dev, "clk_b"); + adg->clk[CLKC] = devm_clk_get(dev, "clk_c"); + adg->clk[CLKI] = devm_clk_get(dev, "clk_i"); /* * It request device dependent audio clock. @@ -432,10 +432,10 @@ int rsnd_adg_probe(struct platform_device *pdev, * but will be removed soon */ if (use_old_style) { - adg->clk[CLKA] = clk_get(NULL, "audio_clk_a"); - adg->clk[CLKB] = clk_get(NULL, "audio_clk_b"); - adg->clk[CLKC] = clk_get(NULL, "audio_clk_c"); - adg->clk[CLKI] = clk_get(NULL, "audio_clk_internal"); + adg->clk[CLKA] = devm_clk_get(NULL, "audio_clk_a"); + adg->clk[CLKB] = devm_clk_get(NULL, "audio_clk_b"); + adg->clk[CLKC] = devm_clk_get(NULL, "audio_clk_c"); + adg->clk[CLKI] = devm_clk_get(NULL, "audio_clk_internal"); } for_each_rsnd_clk(clk, adg, i) { @@ -457,10 +457,4 @@ int rsnd_adg_probe(struct platform_device *pdev, void rsnd_adg_remove(struct platform_device *pdev, struct rsnd_priv *priv) { - struct rsnd_adg *adg = priv->adg; - struct clk *clk; - int i; - - for_each_rsnd_clk(clk, adg, i) - clk_put(clk); }