From patchwork Fri Apr 10 08:49:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6193271 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB7409F2E9 for ; Fri, 10 Apr 2015 08:50:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE132201FE for ; Fri, 10 Apr 2015 08:50:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A96C8201DD for ; Fri, 10 Apr 2015 08:50:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CA6DA265E05; Fri, 10 Apr 2015 10:50:05 +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.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id DD13F265DF1; Fri, 10 Apr 2015 10:49:51 +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 D8875265DF4; Fri, 10 Apr 2015 10:49:50 +0200 (CEST) Received: from relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id 4771F265E05 for ; Fri, 10 Apr 2015 10:49:29 +0200 (CEST) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 10 Apr 2015 17:49:28 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id DB9493E2C1; Fri, 10 Apr 2015 17:49:27 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id C2B282806D; Fri, 10 Apr 2015 17:49:27 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id B77092806F; Fri, 10 Apr 2015 17:49:27 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id TAH31839; Fri, 10 Apr 2015 17:49:27 +0900 X-IronPort-AV: E=Sophos;i="5.11,555,1422889200"; d="scan'208";a="184943951" Received: from mail-sg1lp0093.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.93]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 10 Apr 2015 17:49:26 +0900 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; Received: from morimoto-PC.renesas.com (211.11.155.132) by HKNPR06MB308.apcprd06.prod.outlook.com (10.141.37.28) with Microsoft SMTP Server (TLS) id 15.1.136.25; Fri, 10 Apr 2015 08:49:25 +0000 Message-ID: <874moo8j35.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <8761948j4f.wl%kuninori.morimoto.gx@renesas.com> References: <8761948j4f.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 10 Apr 2015 08:49:25 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: OS1PR01CA0002.jpnprd01.prod.outlook.com (25.161.225.140) To HKNPR06MB308.apcprd06.prod.outlook.com (10.141.37.28) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB308; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(23726002)(83506001)(19580405001)(40100003)(77156002)(77096005)(62966003)(19580395003)(54356999)(76176999)(50466002)(50986999)(92566002)(46102003)(53416004)(122386002)(66066001)(575784001)(86362001)(46406003)(229853001)(2950100001)(36756003)(87976001)(42186005)(110136001)(33646002)(47776003); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR06MB308; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:HKNPR06MB308; BCL:0; PCL:0; RULEID:; SRVR:HKNPR06MB308; X-Forefront-PRVS: 054231DC40 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2015 08:49:25.2690 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR06MB308 Cc: Linux-ALSA , NAOYA SHIIBA , Liam Girdwood , TOSHIAKI KOMATSU , Simon , Atsushi Tamaki Subject: [alsa-devel] [PATCH 1/5] ASoC: rsnd: add rsnd_dai_to_priv() macro 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 Using standardized function/macro name is useful in driver Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 9f48d75..a2a0b57 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -272,9 +272,10 @@ struct rsnd_dai *rsnd_rdai_get(struct rsnd_priv *priv, int id) return priv->rdai + id; } +#define rsnd_dai_to_priv(dai) snd_soc_dai_get_drvdata(dai) static struct rsnd_dai *rsnd_dai_to_rdai(struct snd_soc_dai *dai) { - struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai); + struct rsnd_priv *priv = rsnd_dai_to_priv(dai); return rsnd_rdai_get(priv, dai->id); } @@ -351,7 +352,7 @@ struct rsnd_dai_stream *rsnd_rdai_to_io(struct rsnd_dai *rdai, static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { - struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai); + struct rsnd_priv *priv = rsnd_dai_to_priv(dai); struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); int ssi_id = rsnd_mod_id(rsnd_io_to_mod_ssi(io));