From patchwork Thu Feb 18 08:14:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8347121 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@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 6C3B1C0553 for ; Thu, 18 Feb 2016 08:14:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE11920395 for ; Thu, 18 Feb 2016 08:14:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0109920384 for ; Thu, 18 Feb 2016 08:14:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425120AbcBRIOm (ORCPT ); Thu, 18 Feb 2016 03:14:42 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:8452 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1424633AbcBRIOl (ORCPT ); Thu, 18 Feb 2016 03:14:41 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie1.idc.renesas.com with ESMTP; 18 Feb 2016 17:14:40 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 8DD6E4E987; Thu, 18 Feb 2016 17:14:40 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 882D2480A4; Thu, 18 Feb 2016 17:14:40 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 8181F480A3; Thu, 18 Feb 2016 17:14:40 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id TAA23079; Thu, 18 Feb 2016 17:14:40 +0900 X-IronPort-AV: E=Sophos;i="5.22,464,1449500400"; d="scan'";a="205896916" Received: from mail-sg2apc01lp0245.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.245]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Feb 2016 17:14:39 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=T931iroWh/mnDPOm3wfan0/VpiHjl3+ZBijnuvN73UM=; b=LzGLnSHNs8NgLX3FErxnwht6IKPA9fbGWfbtz+J3rt5aN4+Y9wbUgnzpiYSIjQ//iAj09IijCTqNDU5yq5WzJtPIifcdJOIST87jEFzwcofEfqLpIjZB2x+aJJcAqY1aXXAP4Z6C1Y8r7S1ToRftzuIjAJoezms1AXA1PAgg0ac= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SIXPR06MB1022.apcprd06.prod.outlook.com (10.160.239.156) with Microsoft SMTP Server (TLS) id 15.1.409.15; Thu, 18 Feb 2016 08:14:37 +0000 Message-ID: <87mvqytp5d.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 04/11] ASoC: rsnd: SSI function parameter uses "mod" instead of "ssi" User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown CC: Linux-ALSA , Liam Girdwood , Simon , In-Reply-To: <87si0qtp8x.wl%kuninori.morimoto.gx@renesas.com> References: <87si0qtp8x.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 18 Feb 2016 08:14:37 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR0201CA0040.apcprd02.prod.outlook.com (25.164.90.178) To SIXPR06MB1022.apcprd06.prod.outlook.com (25.160.239.156) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB1022; 2:B1647RPP43qqIxPGpH8gf10xZMcEfntSwgf0kOoFsZZdeX093++XV8imtWCzddT8OkuYYD6rWop/aPJQazHJ0Fw7/Jxj+W6hDZyzAAgPHrx4DUzRPKM5uhmpIa/Lz0uJs7QOGYoelagVbsplKTFMzw==; 3:zOkmQpgDTBREPAl5pjxJf/UfXtVKcCmjG3WzyP0dU2eBgEYtLCOwc0Pc775d7Mwug/wiDy1KeOoDqV+EgApjiLzjnICX8r3dAGGAsyyyY6tgkPA5dga/iEAiJHTRIQcW; 25:Za6/7icyOk+J1mKG+GtSRe1nlDJ71IeRoIJ+z9m/ZSy+x7wVPDpo234rFVh8we0vYrt/D2ThLeWOk8fgyG3dXhPljKMKPEFjYNQRS9aTBQJR0mthfWdXVdtWPsDanUBpPx8x89w+NvrH9z0/+FJi8C8l0LSW6oYXnXRsCAy/OoRP5l/PeNvFe8UEsb7QI2+mjAsjZoEDx7686se6zEz7VzZdSfflX9nr1mnn0dJo3GISNDfqeVtETeSGh6V8dPNZB+5rKGyLbw4fhajlpqBPFMKXE6hGEi1AnxPx2Po/zShYI1AfdyVbwFPoZagHCviq X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB1022; X-MS-Office365-Filtering-Correlation-Id: df0daaf8-085d-41a4-f981-08d3383b8b66 X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB1022; 20:HgfQNBsr0yFuS7zA7pN8qfZ/eGQIqbxCHsGT0i0nZ3UCGNrOVPcwMfc42Se9bZsrsiCnJl09N1e6upvFJNpQk59QEuLjNDGn9JTcOVS3UZk/vTEZqjLes4aorWw1Mtu8z3GQXl2cn4dE/hWm2xwD70sPvNbVN/wg1mErcRL0/7+whsNsJzCTW/2bHRIFdx0Zeug+c912h4KXKRrd0BR4CeB9dFr+bKnN3zXQy1vIfxRPG3Z9DnRD97cib3LswveqmfoI6o5jaFzU5MUvHQ9uXPf7LFuhiHrrNMQ2GqWxkPV88f16mx1SWo2Db6iO9IggpVRtvYNIOr1q6UXLDTgJkAdapx+H7rs1VzvNhEw23hr9+D3cl/48eO3iS47pzKYNkubjz2XR0mUIpHYQjB30PCxrj4JWNpMCG0Dm3ei9hslR4/dO5GlUZXvSrpSGWjT3IisNPCQWmMgZ7Vr9km/HzANNkf053hzPGWMOmIN0MP1LTVGaV6Cal342c/OpF50d; 4:dZKyGEtw11U3eBGvOjGfsgzUtLFQ2ObUQBiLvv6lI2QFDPCbWcHllkRXzc4HRro9KJHYbEy7w6kRbx0H8IA7CT16fJzUSvPmEwyRvUHHCzMrE9Um9C60dncVwVZImgIPts0ImTzQO+p1t2DC1d5hD0HpFC9ZYwwIfDtev//VvydYis1+5RE3YdXcF1XE3X+pR3iPRDEiwMB5DngXbnP5PDlXRuZ8DWgnrMStmxt/zgJ0GV8OBNch2tP8o1Ojdm0EiAxHw+He0F1ykv3vO3MDgM5exDkCpxKLnQDE5NPnHS4Q3Z4ET1po3MYT5Xvlsx0+TNSJBmpVJ6bdzI/mcMrVPNjQ9JpBpv1a5wEli3QXMCD3xAP4aL+BI9+pgyKLr7wg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:SIXPR06MB1022; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB1022; X-Forefront-PRVS: 085634EFF4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(40100003)(229853001)(87976001)(2950100001)(46406003)(76176999)(36756003)(50466002)(586003)(3846002)(19580405001)(19580395003)(2906002)(50986999)(83506001)(4326007)(1096002)(5008740100001)(4001350100001)(53416004)(5001960100002)(110136002)(92566002)(23726003)(122386002)(77096005)(33646002)(189998001)(86362001)(42186005)(47776003)(5004730100002); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB1022; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB1022; 23:mXu0ko3us2UyDAQAzY23os3D2LkVCYbkDEeh0zrLehFNT1YIbM70QSOfucry3QyWOiAPblH3ctEEYU+F4XAN3YWrQwkN6Zzdl+Rj4124uFGftIfNIwJ7Gteh4apd1tGun11mICof8ZMhXxicwksB9aihWdrhF9GRpOpxhnzfUM+M7al1R/n85RJ41DxuX5J2k4t44X785+vf83Sb8IQ0kLfbntqgmpobbwUF20EqwMwUmOqyIEpW18MP5UCovJ3niaMGhSrCccclrivg76lSXBDX6VDHKdIz/s7O1/5+0vRa+fLRsCJWghGhb7SwtVa227hLkiHd/5oI0VEPg0W9PzyoQjj1rIB4yx7dl1rmAm5JxeksdYVXoOKAtFm+vH0KnA42pGzvvnbwAkWn7MbattBxLSl/Cgxazi4nJxglJX4Ad5ZjNDp+kl0WrDs4pcILyUSQdCUsGhxDSEGYZ5T0dtIfu0j6tnX1emQyqA2qsPS/Sqt3uSDXhg3qkOQdmDmoPLuq8bt5080uHe8aU1xucuNBpqH33nNztcdoDMyPKHU7mCgWn0/POqv5ka5CHm0wyocfB1YiVBrGWko+9guA/cOvsDoYyWNx1bXzWdRlxteerfVGppgOXz+doh9aXDsKL2TGq8dtqUN0CGyiWL00q5vajUnT6CIwylsPA7K9jwd9IsTXbGR7usvBPgCMRiqPKOCDn4DkZyAPJug4li2pvciEzRFVrr0fFTtwfYAL5NcOhtz2AKZW5JhK68mSOCcG5tVnqE1L371tNAPeFPN+DWY/1QCNSW4AIf2xBeTspPSJZj1o3UapeAV1SORsR99ddIuT5K3dLcCbQxJJK1EvB+Zn0ywYrdbQjd9WwRCH9P2Q9DKzuLOt2olz1YZDKClMxzhCwREuYLSPVBOk5nRXHfTJNQoteA0e4TaFbz+tq 5SfPxMntHJYQ8yTU0Hra7LN X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB1022; 5:T3On5v0oVF9kCDzfSCrMfnInuK3/zOlfTcoQv5G15ktD1bHURbrTwe0zFtAHvFf/qUq5jRn0vMw682tR+1In15ZpQvU0ZA6mKFwSozF+UUMwDtCtzHy86dQvOpLQujkKcOzJFLkAVZo3MCIvKY7XhA==; 24:fWf7DIfhWBMxfG+ELuYpIdP0ny08rO9Xu84BURYJOpB6FL7bVd7nDF6owvVoHarRYj7JdmgiK+wGUF217BZZsX/5a3dUdxBkSP2z74JcWX0=; 20:B56giqdUVdj4Z89uo+WfhGWnwmuhUqjaAko4ud7osA+Qj+ACILEOBtYHmvyd2aJOJmjbZKx0k3dW/VUMj8zFQ+jMvq1T2di5f44DJ1JG/wEXMrCoqmxgTJ/vA8jqiRv5eFpRGAf5admuEU6L3Zv+/2+NwZabxHAF0o8lVOXnLbA= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2016 08:14:37.5816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB1022 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,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 To reduce confusion, SSI uses "mod" instead of "ssi" as function parameter Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/ssi.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index a72ce28..c5c4510 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -188,14 +188,14 @@ u32 rsnd_ssi_multi_slaves(struct rsnd_dai_stream *io) return mask; } -static int rsnd_ssi_master_clk_start(struct rsnd_ssi *ssi, +static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { struct rsnd_priv *priv = rsnd_io_to_priv(io); struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_dai *rdai = rsnd_io_to_rdai(io); - struct rsnd_mod *mod = rsnd_mod_get(ssi); + struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); int slots = rsnd_get_slot_width(io); int j, ret; @@ -255,11 +255,11 @@ static int rsnd_ssi_master_clk_start(struct rsnd_ssi *ssi, return -EIO; } -static void rsnd_ssi_master_clk_stop(struct rsnd_ssi *ssi, +static void rsnd_ssi_master_clk_stop(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { struct rsnd_dai *rdai = rsnd_io_to_rdai(io); - struct rsnd_mod *mod = rsnd_mod_get(ssi); + struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io); if (!rsnd_rdai_is_clk_master(rdai)) @@ -277,11 +277,12 @@ static void rsnd_ssi_master_clk_stop(struct rsnd_ssi *ssi, rsnd_adg_ssi_clk_stop(mod); } -static int rsnd_ssi_config_init(struct rsnd_ssi *ssi, +static int rsnd_ssi_config_init(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { struct rsnd_dai *rdai = rsnd_io_to_rdai(io); struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); + struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); u32 cr_own; u32 cr_mode; u32 wsr; @@ -317,7 +318,7 @@ static int rsnd_ssi_config_init(struct rsnd_ssi *ssi, return -EINVAL; } - if (rsnd_ssi_is_dma_mode(rsnd_mod_get(ssi))) { + if (rsnd_ssi_is_dma_mode(mod)) { cr_mode = UIEN | OIEN | /* over/under run */ DMEN; /* DMA : enable DMA */ } else { @@ -356,14 +357,14 @@ static int rsnd_ssi_init(struct rsnd_mod *mod, rsnd_mod_power_on(mod); - ret = rsnd_ssi_master_clk_start(ssi, io); + ret = rsnd_ssi_master_clk_start(mod, io); if (ret < 0) return ret; if (rsnd_ssi_is_parent(mod, io)) return 0; - ret = rsnd_ssi_config_init(ssi, io); + ret = rsnd_ssi_config_init(mod, io); if (ret < 0) return ret; @@ -389,7 +390,7 @@ static int rsnd_ssi_quit(struct rsnd_mod *mod, if (!rsnd_ssi_is_parent(mod, io)) ssi->cr_own = 0; - rsnd_ssi_master_clk_stop(ssi, io); + rsnd_ssi_master_clk_stop(mod, io); rsnd_mod_power_off(mod);