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: 3975591 Return-Path: X-Original-To: patchwork-linux-sh@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 A43C49F2CC for ; Mon, 14 Apr 2014 00:57:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D89092014A for ; Mon, 14 Apr 2014 00:57:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10F512015D for ; Mon, 14 Apr 2014 00:57:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750841AbaDNA5U (ORCPT ); Sun, 13 Apr 2014 20:57:20 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:65413 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbaDNA5U (ORCPT ); Sun, 13 Apr 2014 20:57:20 -0400 Received: by mail-pd0-f170.google.com with SMTP id v10so7483870pde.29 for ; Sun, 13 Apr 2014 17:57:19 -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 Subject: [PATCH 6/7] ASoC: rsnd: remove old clock style support User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon , broonie@kernel.org Cc: Magnus , linux-sh@vger.kernel.org, Kuninori Morimoto , alsa-devel@alsa-project.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") Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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);