From patchwork Wed Dec 13 23:18:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 10111077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3D1060352 for ; Wed, 13 Dec 2017 23:20:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95B1E2936A for ; Wed, 13 Dec 2017 23:20:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A5E2296EF; Wed, 13 Dec 2017 23:20:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B69232936A for ; Wed, 13 Dec 2017 23:20:37 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 31D6B267997; Thu, 14 Dec 2017 00:19:11 +0100 (CET) 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 4640726797D; Thu, 14 Dec 2017 00:19:08 +0100 (CET) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by alsa0.perex.cz (Postfix) with ESMTP id 282A72672B9 for ; Thu, 14 Dec 2017 00:19:02 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id j28so2253647pfk.8 for ; Wed, 13 Dec 2017 15:19:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CQ4bz0rL9xODA1HE+XDxR6Ng35qeBReFFnZIbLCHjic=; b=cFNvZYFK5C9+1qujC+hH9hKcrEO7Hxb6swSnzN91r6B1aEMOdBZofvoDK+ag42W2XV V8XU1hQfjqQgc7wJsbGWMcY2UpgM0Xgk97H4I/cWHhcPENmGhHNNwcfvy+E/ZfVC/AhH lRVn/NY6tpAxHxqU8hOHOq6HVrcdSGcaqxBODq2tDiEcIAB5OkOig/b3A6ZKcAHrtCuf 6Dt2U5tu2xc44qWbUpD1zbEvckvQvKa4FQjP8EsV+1mFszpv2RSuJs2biqEnEnIOPOcW KX6zHaskX69CXQPsX+q0BIZwcymztR4L34q3PfJtOjwHXtxlS2pjm6Of8KNHlDDO1to7 eKFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CQ4bz0rL9xODA1HE+XDxR6Ng35qeBReFFnZIbLCHjic=; b=aVrBX3cTElN1muFakQewgugC61oVuts35Du4IBZmmYnkCSzHDJEO4QdJg3Ng7ecRw9 8hBhheMTM3+0I3ONkSB+3gVXzf07Uv5BdUnq7IpSAHQQkrb5nih8LSJmhh024uWeP2rG 7rS0UW2ipMLFXjL/zWBUITKBjJFpA00QCI3nzCgrlTD0X3NCSsBPso5adeI+KXCbB2L9 BTqrwFxKkavlP27Li/f5JV9KLtlfM64EYYChSW+YWH/oXoegHkO9lGy4nHFiAOVA1gBC 9vgsgD72QGFWjVyGJcTDH7T+18otioXnAwdAHT+Vtjvy1oc1oesXAdH4a7QjMiOIqzNK fO7g== X-Gm-Message-State: AKGB3mJ7DRPj46BvXBR62XEOHNzNuRKhCV6yjKp6abD5t3qoA80UYkcO S9OFe6eALjo3Iwmu646v9NI= X-Google-Smtp-Source: ACJfBosWTOliUkU5REJMVf1P4x0w7ZM4eAZ4jBE3nXTFOZMEhv4Nqc1qwGDbpiJ4VOb0X2oKRHyyTg== X-Received: by 10.98.236.137 with SMTP id e9mr7664280pfm.123.1513207141582; Wed, 13 Dec 2017 15:19:01 -0800 (PST) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id z2sm4232483pgu.17.2017.12.13.15.19.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Dec 2017 15:19:01 -0800 (PST) From: Nicolin Chen To: broonie@kernel.org Date: Wed, 13 Dec 2017 15:18:24 -0800 Message-Id: <1513207108-30430-8-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1513207108-30430-1-git-send-email-nicoleotsuka@gmail.com> References: <1513207108-30430-1-git-send-email-nicoleotsuka@gmail.com> Cc: mail@maciej.szmigiero.name, timur@tabi.org, kernel@pengutronix.de, lgirdwood@gmail.com, alsa-devel@alsa-project.org, caleb@crome.org, linux-kernel@vger.kernel.org, arnaud.mouiche@invoxia.com, lukma@denx.de, fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH v3 07/11] ASoC: fsl_ssi: Rename cpu_dai parameter to dai 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Shortens the variable name to save space, useful for dev_err outputs. Signed-off-by: Nicolin Chen Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 7b6aedd..83d6e3d 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -668,10 +668,10 @@ static void fsl_ssi_shutdown(struct snd_pcm_substream *substream, * (In 2-channel I2S Master mode, slot_width is fixed 32) */ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, - struct snd_soc_dai *cpu_dai, + struct snd_soc_dai *dai, struct snd_pcm_hw_params *hw_params) { - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(cpu_dai); + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(dai); struct regmap *regs = ssi->regs; int synchronous = ssi->cpu_dai_drv.symmetric_rates, ret; u32 pm = 999, div2, psr, stccr, mask, afreq, factor, i; @@ -701,7 +701,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, * never greater than 1/5 IPG clock rate */ if (freq * 5 > clk_get_rate(ssi->clk)) { - dev_err(cpu_dai->dev, "bitclk > ipgclk / 5\n"); + dev_err(dai->dev, "bitclk > ipgclk / 5\n"); return -EINVAL; } @@ -750,7 +750,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, /* No proper pm found if it is still remaining the initial value */ if (pm == 999) { - dev_err(cpu_dai->dev, "failed to handle the required sysclk\n"); + dev_err(dai->dev, "failed to handle the required sysclk\n"); return -EINVAL; } @@ -766,7 +766,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, if (!baudclk_is_used) { ret = clk_set_rate(ssi->baudclk, baudrate); if (ret) { - dev_err(cpu_dai->dev, "failed to set baudclk rate\n"); + dev_err(dai->dev, "failed to set baudclk rate\n"); return -EINVAL; } } @@ -787,9 +787,9 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, */ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params, - struct snd_soc_dai *cpu_dai) + struct snd_soc_dai *dai) { - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(cpu_dai); + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(dai); struct regmap *regs = ssi->regs; unsigned int channels = params_channels(hw_params); unsigned int sample_size = params_width(hw_params); @@ -811,7 +811,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, return 0; if (fsl_ssi_is_i2s_master(ssi)) { - ret = fsl_ssi_set_bclk(substream, cpu_dai, hw_params); + ret = fsl_ssi_set_bclk(substream, dai, hw_params); if (ret) return ret; @@ -849,7 +849,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, } static int fsl_ssi_hw_free(struct snd_pcm_substream *substream, - struct snd_soc_dai *cpu_dai) + struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(rtd->cpu_dai); @@ -1018,30 +1018,30 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev, /** * Configure Digital Audio Interface (DAI) Format */ -static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) +static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) { - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(cpu_dai); + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(dai); /* AC97 configured DAIFMT earlier in the probe() */ if (fsl_ssi_is_ac97(ssi)) return 0; - return _fsl_ssi_set_dai_fmt(cpu_dai->dev, ssi, fmt); + return _fsl_ssi_set_dai_fmt(dai->dev, ssi, fmt); } /** * Set TDM slot number and slot width */ -static int fsl_ssi_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask, +static int fsl_ssi_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mask, int slots, int slot_width) { - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(cpu_dai); + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(dai); struct regmap *regs = ssi->regs; u32 val; /* The word length should be 8, 10, 12, 16, 18, 20, 22 or 24 */ if (slot_width & 1 || slot_width < 8 || slot_width > 24) { - dev_err(cpu_dai->dev, "invalid slot width: %d\n", slot_width); + dev_err(dai->dev, "invalid slot width: %d\n", slot_width); return -EINVAL; } @@ -1049,7 +1049,7 @@ static int fsl_ssi_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask, regmap_read(regs, REG_SSI_SCR, &val); val &= SSI_SCR_I2S_MODE_MASK | SSI_SCR_NET; if (val && slots < 2) { - dev_err(cpu_dai->dev, "slot number should be >= 2 in I2S or NET\n"); + dev_err(dai->dev, "slot number should be >= 2 in I2S or NET\n"); return -EINVAL; }