From patchwork Mon Apr 14 00:57:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3975691 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 6EBDE9F336 for ; Mon, 14 Apr 2014 01:10:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A5EBF201B9 for ; Mon, 14 Apr 2014 01:10:53 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 86BD92018A for ; Mon, 14 Apr 2014 01:10:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3AB2E26506D; Mon, 14 Apr 2014 03:10:51 +0200 (CEST) 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, 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 C893E261A83; Mon, 14 Apr 2014 03:07:37 +0200 (CEST) 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 EF054264F40; Mon, 14 Apr 2014 03:07:36 +0200 (CEST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by alsa0.perex.cz (Postfix) with ESMTP id 78E4F261A83 for ; Mon, 14 Apr 2014 03:04:42 +0200 (CEST) Received: by mail-pa0-f53.google.com with SMTP id ld10so7589589pab.12 for ; Sun, 13 Apr 2014 18:04:41 -0700 (PDT) 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=aHJrTWIVif0oX+g+RUqNjTTy7yowsJz3v1ndbN4hFic=; b=BJy8MvAL0NYATs6Mozj68mvwTblTvUYxkDeY6S8RYqnrc2xSEvrmtdoJPQRsyht+Bf sDIQooxal4ims+FTF2HjwTgg2XSWO1d89CLxHuv7QCUSf7nXVHkRc9zmAlyA2yyyu7Cq hd/NUUZoFgasMxMrSYWBO4qlO6R0JgJq6cmzA19LJgwTB2jQb4xJYYUusZYaq7g9XUwj Ud8cBIePSTdr+4qbFcj6ryYY1ETUc6qFsEUoRHtqpGWcooZ4Oolf2BW8FAcNijq8H7z3 7SSh3zORM+96JYuhC9JttGSIKN4tpxwve80mTgijVKevTOIQm6zqLZo7uVmRKKoh0Z0J 37bg== X-Received: by 10.68.240.99 with SMTP id vz3mr40884838pbc.93.1397437039773; Sun, 13 Apr 2014 17:57:19 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id te2sm72224368pac.25.2014.04.13.17.57.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 13 Apr 2014 17:57:19 -0700 (PDT) Date: Sun, 13 Apr 2014 17:57:19 -0700 (PDT) Message-ID: <87k3as20er.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon , broonie@kernel.org In-Reply-To: <87sipg20h1.wl%kuninori.morimoto.gx@gmail.com> References: <87sipg20h1.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org, Magnus , Kuninori Morimoto , linux-sh@vger.kernel.org Subject: [alsa-devel] [PATCH 6/7] ASoC: rsnd: remove old clock style support 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 All platform which used old style was switched to new style. R-Car sound can remove old style clock support, use device dependent clock now. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/adg.c | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 69c4426..41556b2 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -397,9 +397,8 @@ int rsnd_adg_probe(struct platform_device *pdev, { struct rsnd_adg *adg; struct device *dev = rsnd_priv_to_dev(priv); - struct clk *clk, *clk_orig; + struct clk *clk; int i; - bool use_old_style = false; adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL); if (!adg) { @@ -407,45 +406,13 @@ int rsnd_adg_probe(struct platform_device *pdev, return -ENOMEM; } - 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. - * But above all clks will indicate rsnd module clock - * if platform doesn't it - */ - for_each_rsnd_clk(clk, adg, i) { - if (clk_orig == clk) { - dev_warn(dev, - "doesn't have device dependent clock, use independent clock\n"); - use_old_style = true; - break; - } - } - - /* - * note: - * these exist in order to keep compatible with - * platform which has device independent audio clock, - * but will be removed soon - */ - if (use_old_style) { - 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) { - if (IS_ERR(clk)) { - dev_err(dev, "Audio clock failed\n"); - return -EIO; - } - } + for_each_rsnd_clk(clk, adg, i) + dev_dbg(dev, "clk %d : %p\n", i, clk); rsnd_adg_ssi_clk_init(priv, adg);