From patchwork Fri Apr 10 08:50:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6193291 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 90154BF4A6 for ; Fri, 10 Apr 2015 08:51:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C238F20351 for ; Fri, 10 Apr 2015 08:51:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9D0FC201DD for ; Fri, 10 Apr 2015 08:51:57 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C9F3726601B; Fri, 10 Apr 2015 10:51: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.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 98674265E10; Fri, 10 Apr 2015 10:50:43 +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 3615C265E17; Fri, 10 Apr 2015 10:50:42 +0200 (CEST) Received: from relmlie3.idc.renesas.com (relmlor4.renesas.com [210.160.252.174]) by alsa0.perex.cz (Postfix) with ESMTP id BEC67265D86 for ; Fri, 10 Apr 2015 10:50:16 +0200 (CEST) Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 10 Apr 2015 17:50:15 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 3D35141B31; Fri, 10 Apr 2015 17:50:15 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 246942806E; Fri, 10 Apr 2015 17:50:15 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 1F41A2806D; Fri, 10 Apr 2015 17:50:15 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id TAE32119; Fri, 10 Apr 2015 17:50:15 +0900 X-IronPort-AV: E=Sophos;i="5.11,555,1422889200"; d="scan'208";a="183797392" Received: from mail-sg1lp0090.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.90]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 10 Apr 2015 17:50:14 +0900 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; Received: from morimoto-PC.renesas.com (211.11.155.132) by HKNPR06MB306.apcprd06.prod.outlook.com (10.141.37.22) with Microsoft SMTP Server (TLS) id 15.1.136.25; Fri, 10 Apr 2015 08:50:12 +0000 Message-ID: <871tjs8j1t.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:50:12 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: OS1PR01CA0024.jpnprd01.prod.outlook.com (25.161.225.162) To HKNPR06MB306.apcprd06.prod.outlook.com (10.141.37.22) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB306; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(19580395003)(19580405001)(54356999)(50986999)(76176999)(83506001)(110136001)(46406003)(87976001)(42186005)(53416004)(229853001)(50466002)(92566002)(33646002)(40100003)(122386002)(23726002)(46102003)(86362001)(77096005)(2950100001)(36756003)(66066001)(62966003)(77156002)(47776003); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR06MB306; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:HKNPR06MB306; BCL:0; PCL:0; RULEID:; SRVR:HKNPR06MB306; X-Forefront-PRVS: 054231DC40 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2015 08:50:12.6533 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR06MB306 Cc: Linux-ALSA , NAOYA SHIIBA , Liam Girdwood , TOSHIAKI KOMATSU , Simon , Atsushi Tamaki Subject: [alsa-devel] [PATCH 3/5] ASoC: rsnd: tidyup SSI parent related function/macro names 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 Current rsnd driver is using SSI parent related function/macro as "clock" related. but it is not only clock related. tidyup function/macro naming. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/ssi.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 7bb9c08..2ef48a4 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -80,7 +80,7 @@ struct rsnd_ssi { #define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod) #define rsnd_dma_to_ssi(dma) rsnd_mod_to_ssi(rsnd_dma_to_mod(dma)) #define rsnd_ssi_pio_available(ssi) ((ssi)->info->irq > 0) -#define rsnd_ssi_clk_from_parent(ssi) ((ssi)->parent) +#define rsnd_ssi_parent(ssi) ((ssi)->parent) #define rsnd_ssi_mode_flags(p) ((p)->info->flags) #define rsnd_ssi_dai_id(ssi) ((ssi)->info->dai_id) #define rsnd_ssi_of_node(priv) \ @@ -189,8 +189,10 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi, rsnd_mod_hw_start(&ssi->mod); if (rsnd_rdai_is_clk_master(rdai)) { - if (rsnd_ssi_clk_from_parent(ssi)) - rsnd_ssi_hw_start(ssi->parent, io); + struct rsnd_ssi *ssi_parent = rsnd_ssi_parent(ssi); + + if (ssi_parent) + rsnd_ssi_hw_start(ssi_parent, io); else rsnd_ssi_master_clk_start(ssi, io); } @@ -253,8 +255,10 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi) rsnd_ssi_status_check(&ssi->mod, IIRQ); if (rsnd_rdai_is_clk_master(rdai)) { - if (rsnd_ssi_clk_from_parent(ssi)) - rsnd_ssi_hw_stop(ssi->parent); + struct rsnd_ssi *ssi_parent = rsnd_ssi_parent(ssi); + + if (ssi_parent) + rsnd_ssi_hw_stop(ssi_parent); else rsnd_ssi_master_clk_stop(ssi); } @@ -598,7 +602,7 @@ int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod) return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_CLK_PIN_SHARE); } -static void rsnd_ssi_parent_clk_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi) +static void rsnd_ssi_parent_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi) { if (!rsnd_ssi_is_pin_sharing(&ssi->mod)) return; @@ -732,7 +736,7 @@ int rsnd_ssi_probe(struct platform_device *pdev, if (ret) return ret; - rsnd_ssi_parent_clk_setup(priv, ssi); + rsnd_ssi_parent_setup(priv, ssi); } return 0;