From patchwork Fri May 23 06:25:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4228341 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 8D9C39F32B for ; Fri, 23 May 2014 06:26:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC8652020E for ; Fri, 23 May 2014 06:26:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8BC7920303 for ; Fri, 23 May 2014 06:26:49 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A7EB0265716; Fri, 23 May 2014 08:26:48 +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_SIGNED, 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 EB7552656C9; Fri, 23 May 2014 08:25:58 +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 056DA2656C9; Fri, 23 May 2014 08:25:58 +0200 (CEST) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by alsa0.perex.cz (Postfix) with ESMTP id DD88D2656E2 for ; Fri, 23 May 2014 08:25:38 +0200 (CEST) Received: by mail-pb0-f41.google.com with SMTP id uo5so3705841pbc.28 for ; Thu, 22 May 2014 23:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:sender:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version:content-type; bh=Is5H/CVCz48vc1N4V1i/2PYxGqa/n6A8h1PwXZkPG9s=; b=HhivajtQVwTLhe5esajZtcWYUN4E1Jc4UYZj51ZXnAvwcSreWB1EL141Jzsg3lcTdP LpJNcVpscO96PEF4A+7QiGLU9Fd6faDRr7Ufr9Be1qZjoKSur4QS9Vle6JLxdKkScPs2 YiW3vjU/NM5lCsvDUEnyZ2qNXzAVFXoIXRGb37/VdOEvqkFTYgPVnOPCGe3nMRDmwHPu 9C7z9BrMpL1a9pe0kBJs2FBj+T3ZrjJA1N8ZWldFXUH41CSrFvYuln0qdInWij88UvhT w3CX1QBTkVTAqwp6me0sE0OmLIAHbhDFxbzKDOjwnRLZ1vxKC5LsjbRwTrxYmwgp5fAS 9lFA== X-Received: by 10.67.14.69 with SMTP id fe5mr3268725pad.120.1400826337487; Thu, 22 May 2014 23:25:37 -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 qj3sm2757138pbc.91.2014.05.22.23.25.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 22 May 2014 23:25:37 -0700 (PDT) Date: Thu, 22 May 2014 23:25:37 -0700 (PDT) Message-ID: <87lhttc8ps.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Mark Brown In-Reply-To: <87r43lc8w5.wl%kuninori.morimoto.gx@gmail.com> References: <87r43lc8w5.wl%kuninori.morimoto.gx@gmail.com> User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: Linux-ALSA , Simon , Liam Girdwood Subject: [alsa-devel] [PATCH 3/6] ASoC: rsnd: remove rsnd_src_non_ops 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 Renesas sound driver is supporting Gen1/Gen2. SRC probe can return error if it was unknown generation. Now, rsnd_src_non_ops is not needed. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/src.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 61009c4..c5ddbcc 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -268,10 +268,6 @@ static int rsnd_src_stop(struct rsnd_mod *mod, return 0; } -static struct rsnd_mod_ops rsnd_src_non_ops = { - .name = "src (non)", -}; - /* * Gen1 functions */ @@ -627,6 +623,16 @@ int rsnd_src_probe(struct platform_device *pdev, char name[RSND_SRC_NAME_SIZE]; int i, nr; + ops = NULL; + if (rsnd_is_gen1(priv)) + ops = &rsnd_src_gen1_ops; + if (rsnd_is_gen2(priv)) + ops = &rsnd_src_gen2_ops; + if (!ops) { + dev_err(dev, "unknown Generation\n"); + return -EIO; + } + rsnd_of_parse_src(pdev, of_data, priv); /* @@ -655,12 +661,6 @@ int rsnd_src_probe(struct platform_device *pdev, src->info = &info->src_info[i]; src->clk = clk; - ops = &rsnd_src_non_ops; - if (rsnd_is_gen1(priv)) - ops = &rsnd_src_gen1_ops; - if (rsnd_is_gen2(priv)) - ops = &rsnd_src_gen2_ops; - rsnd_mod_init(priv, &src->mod, ops, RSND_MOD_SRC, i); dev_dbg(dev, "SRC%d probed\n", i);