From patchwork Tue Oct 3 18:13:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 730356 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6227E7C4F5 for ; Thu, 5 Oct 2023 07:53:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1E55FECC; Thu, 5 Oct 2023 09:53:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1E55FECC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696492435; bh=bt5J5fh5JDF9Qn4xoTeao+osiheqHYKP1EfCbyh3YY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lW9m2SsbiaXL2AoC7fCosmEEMZsPxryEAil3RK+6JytJElCzto5Y3RIbydpWwb3/R 2otOKqZbl1p0AequFZCDbzEuPd32XAimr+7FvWxXL38pOovesJc5rB0LuV2N9b53ZN s4CY7oLR21OHkHW5aPmTHLVaWyf//vniWmdbqHKA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 267E6F805A9; Thu, 5 Oct 2023 09:51:29 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7488FF80589; Thu, 5 Oct 2023 09:51:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D4A60F80551; Tue, 3 Oct 2023 20:13:53 +0200 (CEST) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4366AF80130 for ; Tue, 3 Oct 2023 20:13:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4366AF80130 Authentication-Results: alsa1.perex.cz; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Yf1Ix/bp Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3D567CE1997; Tue, 3 Oct 2023 18:13:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56DA3C433CD; Tue, 3 Oct 2023 18:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696356814; bh=bt5J5fh5JDF9Qn4xoTeao+osiheqHYKP1EfCbyh3YY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yf1Ix/bpZe+VMXS6FL37MVUsc6INuRN/hTturC6eWMKqzGpplFoS8T1uxg89FHhlh PWWL98sqWkwfUPFQqJojgPyw3yIPs0JzTqM1CpLqjfX32rMHJoeI6OioFJlby5+CRu zqsAp3PgPg+SCfF/rtFcoyLF4OCNb8gxjDt7/XnPaORIGWYymJHamYgtCe9LJAfXGh MFxiJM0+pqkaNCHQFLLjo8/ig8fOHLxgDUD4m/TttPqMF9sCpTD6ZvM6/o+T+pSa1O KmRjVXKz0kieC3csciiwD8zksA4XN1WJQLhfLaCBvx1stsuFIn25Dnvcpk5ZbLSVRA R80WbuO9g7afw== Received: (nullmailer pid 1020043 invoked by uid 1000); Tue, 03 Oct 2023 18:13:14 -0000 From: Rob Herring To: Claudiu Beznea , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Peter Rosin , Ray Jui , Scott Branden , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , James Schulman , David Rhodes , Richard Fitzgerald , Support Opensource , Matthias Brugger , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Oder Chiou , Fabio Estevam , Kiseok Jo , Kevin Cernekee , Shengjiu Wang , Xiubo Li , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , Srinivas Kandagatla , Banajit Goswami , Nicolas Frattaroli , Heiko Stuebner , Sylwester Nawrocki , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Ban Tao , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Cezary Rojewski , Pierre-Louis Bossart , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linuxppc-dev@lists.ozlabs.org Subject: [PATCH RESEND 4/5] ASoC: qcom/lpass: Constify struct lpass_variant Date: Tue, 3 Oct 2023 13:13:13 -0500 Message-Id: <20231003-dt-asoc-header-cleanups-v1-4-05b5d6447e5a@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231003-dt-asoc-header-cleanups-v1-0-05b5d6447e5a@kernel.org> References: <20231003-dt-asoc-header-cleanups-v1-0-05b5d6447e5a@kernel.org> MIME-Version: 1.0 X-Mailer: b4 0.13-dev X-MailFrom: SRS0=FdhD=FR=robh_at_kernel.org=rob@kernel.org X-Mailman-Rule-Hits: max-recipients X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-size; news-moderation; no-subject; digests; suspicious-header Message-ID-Hash: LK55ESAIXSDSXOK2MO2DQDYPAMJRB5CO X-Message-ID-Hash: LK55ESAIXSDSXOK2MO2DQDYPAMJRB5CO X-Mailman-Approved-At: Thu, 05 Oct 2023 07:51:20 +0000 X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 'struct lpass_variant' is used for driver match data which is supposed to be constant. It's not modified anywhere, so it's just a matter of adding 'const' everywhere. Signed-off-by: Rob Herring --- sound/soc/qcom/lpass-apq8016.c | 6 +++--- sound/soc/qcom/lpass-cdc-dma.c | 2 +- sound/soc/qcom/lpass-cpu.c | 28 ++++++++++++++-------------- sound/soc/qcom/lpass-ipq806x.c | 2 +- sound/soc/qcom/lpass-platform.c | 36 ++++++++++++++++++------------------ sound/soc/qcom/lpass-sc7180.c | 6 +++--- sound/soc/qcom/lpass-sc7280.c | 6 +++--- sound/soc/qcom/lpass.h | 2 +- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c index f919d46e18ca..8ce75b442b64 100644 --- a/sound/soc/qcom/lpass-apq8016.c +++ b/sound/soc/qcom/lpass-apq8016.c @@ -123,7 +123,7 @@ static struct snd_soc_dai_driver apq8016_lpass_cpu_dai_driver[] = { static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata, int direction, unsigned int dai_id) { - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int chan = 0; if (direction == SNDRV_PCM_STREAM_PLAYBACK) { @@ -157,7 +157,7 @@ static int apq8016_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, static int apq8016_lpass_init(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; struct device *dev = &pdev->dev; int ret, i; @@ -223,7 +223,7 @@ static int apq8016_lpass_exit(struct platform_device *pdev) } -static struct lpass_variant apq8016_data = { +static const struct lpass_variant apq8016_data = { .i2sctrl_reg_base = 0x1000, .i2sctrl_reg_stride = 0x1000, .i2s_ports = 4, diff --git a/sound/soc/qcom/lpass-cdc-dma.c b/sound/soc/qcom/lpass-cdc-dma.c index 8221e2cbe35c..6389c7b6051e 100644 --- a/sound/soc/qcom/lpass-cdc-dma.c +++ b/sound/soc/qcom/lpass-cdc-dma.c @@ -37,7 +37,7 @@ static void __lpass_get_dmactl_handle(struct snd_pcm_substream *substream, struc struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int dai_id = cpu_dai->driver->id; switch (dai_id) { diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 39571fed4001..18aff2654f89 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -44,7 +44,7 @@ static int lpass_cpu_init_i2sctl_bitfields(struct device *dev, struct lpaif_i2sctl *i2sctl, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; i2sctl->loopback = devm_regmap_field_alloc(dev, map, v->loopback); i2sctl->spken = devm_regmap_field_alloc(dev, map, v->spken); @@ -463,7 +463,7 @@ static int asoc_qcom_of_xlate_dai_name(struct snd_soc_component *component, const char **dai_name) { struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; int id = args->args[0]; int ret = -EINVAL; int i; @@ -488,7 +488,7 @@ static const struct snd_soc_component_driver lpass_cpu_comp_driver = { static bool lpass_cpu_regmap_writeable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->i2s_ports; ++i) @@ -530,7 +530,7 @@ static bool lpass_cpu_regmap_writeable(struct device *dev, unsigned int reg) static bool lpass_cpu_regmap_readable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->i2s_ports; ++i) @@ -578,7 +578,7 @@ static bool lpass_cpu_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_cpu_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->irq_ports; ++i) { @@ -613,7 +613,7 @@ static struct regmap_config lpass_cpu_regmap_config = { static int lpass_hdmi_init_bitfields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int i; struct lpass_hdmi_tx_ctl *tx_ctl; struct regmap_field *legacy_en; @@ -691,7 +691,7 @@ static int lpass_hdmi_init_bitfields(struct device *dev, struct regmap *map) static bool lpass_hdmi_regmap_writeable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; if (reg == LPASS_HDMI_TX_CTL_ADDR(v)) @@ -736,7 +736,7 @@ static bool lpass_hdmi_regmap_writeable(struct device *dev, unsigned int reg) static bool lpass_hdmi_regmap_readable(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; if (reg == LPASS_HDMI_TX_CTL_ADDR(v)) @@ -785,7 +785,7 @@ static bool lpass_hdmi_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_hdmi_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; if (reg == LPASS_HDMITX_APP_IRQSTAT_REG(v)) @@ -824,7 +824,7 @@ static struct regmap_config lpass_hdmi_regmap_config = { static bool __lpass_rxtx_regmap_accessible(struct device *dev, unsigned int reg, bool rw) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->rxtx_irq_ports; ++i) { @@ -890,7 +890,7 @@ static bool lpass_rxtx_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_rxtx_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->rxtx_irq_ports; ++i) { @@ -915,7 +915,7 @@ static bool lpass_rxtx_regmap_volatile(struct device *dev, unsigned int reg) static bool __lpass_va_regmap_accessible(struct device *dev, unsigned int reg, bool rw) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->va_irq_ports; ++i) { @@ -965,7 +965,7 @@ static bool lpass_va_regmap_readable(struct device *dev, unsigned int reg) static bool lpass_va_regmap_volatile(struct device *dev, unsigned int reg) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int i; for (i = 0; i < v->va_irq_ports; ++i) { @@ -1104,7 +1104,7 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) struct lpass_data *drvdata; struct device_node *dsp_of_node; struct resource *res; - struct lpass_variant *variant; + const struct lpass_variant *variant; struct device *dev = &pdev->dev; const struct of_device_id *match; int ret, i, dai_id; diff --git a/sound/soc/qcom/lpass-ipq806x.c b/sound/soc/qcom/lpass-ipq806x.c index 2c97f295e394..bbe9f11d7780 100644 --- a/sound/soc/qcom/lpass-ipq806x.c +++ b/sound/soc/qcom/lpass-ipq806x.c @@ -108,7 +108,7 @@ static int ipq806x_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, return 0; } -static struct lpass_variant ipq806x_data = { +static const struct lpass_variant ipq806x_data = { .i2sctrl_reg_base = 0x0010, .i2sctrl_reg_stride = 0x04, .i2s_ports = 5, diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index 73e3d39bd24c..6569102486e2 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -100,7 +100,7 @@ static int lpass_platform_alloc_rxtx_dmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *rd_dmactl, *wr_dmactl; int rval; @@ -128,7 +128,7 @@ static int lpass_platform_alloc_va_dmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *wr_dmactl; wr_dmactl = devm_kzalloc(dev, sizeof(*wr_dmactl), GFP_KERNEL); @@ -145,7 +145,7 @@ static int lpass_platform_alloc_dmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *rd_dmactl, *wr_dmactl; int rval; @@ -175,7 +175,7 @@ static int lpass_platform_alloc_hdmidmactl_fields(struct device *dev, struct regmap *map) { struct lpass_data *drvdata = dev_get_drvdata(dev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *rd_dmactl; rd_dmactl = devm_kzalloc(dev, sizeof(struct lpaif_dmactl), GFP_KERNEL); @@ -195,7 +195,7 @@ static int lpass_platform_pcmops_open(struct snd_soc_component *component, struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int ret, dma_ch, dir = substream->stream; struct lpass_pcm_data *data; struct regmap *map; @@ -287,7 +287,7 @@ static int lpass_platform_pcmops_close(struct snd_soc_component *component, struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpass_pcm_data *data; unsigned int dai_id = cpu_dai->driver->id; @@ -358,7 +358,7 @@ static int __lpass_get_id(const struct snd_pcm_substream *substream, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int id; switch (cpu_dai->driver->id) { @@ -421,7 +421,7 @@ static int lpass_platform_pcmops_hw_params(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; snd_pcm_format_t format = params_format(params); unsigned int channels = params_channels(params); unsigned int regval; @@ -574,7 +574,7 @@ static int lpass_platform_pcmops_hw_free(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int reg; int ret; struct regmap *map; @@ -602,7 +602,7 @@ static int lpass_platform_pcmops_prepare(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *dmactl; struct regmap *map; int ret, id, ch, dir = substream->stream; @@ -665,7 +665,7 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component, struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; struct lpaif_dmactl *dmactl; struct regmap *map; int ret, ch, id; @@ -864,7 +864,7 @@ static snd_pcm_uframes_t lpass_platform_pcmops_pointer( struct lpass_data *drvdata = snd_soc_component_get_drvdata(component); struct snd_pcm_runtime *rt = substream->runtime; struct lpass_pcm_data *pcm_data = rt->private_data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int base_addr, curr_addr; int ret, ch, dir = substream->stream; struct regmap *map; @@ -928,7 +928,7 @@ static irqreturn_t lpass_dma_interrupt_handler( { struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; irqreturn_t ret = IRQ_NONE; int rv; unsigned int reg, val, mask; @@ -1020,7 +1020,7 @@ static irqreturn_t lpass_dma_interrupt_handler( static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; int rv, chan; @@ -1048,7 +1048,7 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) static irqreturn_t lpass_platform_hdmiif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; int rv, chan; @@ -1078,7 +1078,7 @@ static irqreturn_t lpass_platform_hdmiif_irq(int irq, void *data) static irqreturn_t lpass_platform_rxtxif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; irqreturn_t rv; int chan; @@ -1103,7 +1103,7 @@ static irqreturn_t lpass_platform_rxtxif_irq(int irq, void *data) static irqreturn_t lpass_platform_vaif_irq(int irq, void *data) { struct lpass_data *drvdata = data; - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; unsigned int irqs; irqreturn_t rv; int chan; @@ -1268,7 +1268,7 @@ static const struct snd_soc_component_driver lpass_component_driver = { int asoc_qcom_lpass_platform_register(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int ret; drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif"); diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c index d16c0d83aaad..1b0c04b210ce 100644 --- a/sound/soc/qcom/lpass-sc7180.c +++ b/sound/soc/qcom/lpass-sc7180.c @@ -76,7 +76,7 @@ static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { static int sc7180_lpass_alloc_dma_channel(struct lpass_data *drvdata, int direction, unsigned int dai_id) { - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int chan = 0; if (dai_id == LPASS_DP_RX) { @@ -123,7 +123,7 @@ static int sc7180_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, u static int sc7180_lpass_init(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; struct device *dev = &pdev->dev; int ret, i; @@ -179,7 +179,7 @@ static const struct dev_pm_ops sc7180_lpass_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume) }; -static struct lpass_variant sc7180_data = { +static const struct lpass_variant sc7180_data = { .i2sctrl_reg_base = 0x1000, .i2sctrl_reg_stride = 0x1000, .i2s_ports = 3, diff --git a/sound/soc/qcom/lpass-sc7280.c b/sound/soc/qcom/lpass-sc7280.c index 6b2eb25ed939..7cd3e291382a 100644 --- a/sound/soc/qcom/lpass-sc7280.c +++ b/sound/soc/qcom/lpass-sc7280.c @@ -110,7 +110,7 @@ static struct snd_soc_dai_driver sc7280_lpass_cpu_dai_driver[] = { static int sc7280_lpass_alloc_dma_channel(struct lpass_data *drvdata, int direction, unsigned int dai_id) { - struct lpass_variant *v = drvdata->variant; + const struct lpass_variant *v = drvdata->variant; int chan = 0; switch (dai_id) { @@ -196,7 +196,7 @@ static int sc7280_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, u static int sc7280_lpass_init(struct platform_device *pdev) { struct lpass_data *drvdata = platform_get_drvdata(pdev); - struct lpass_variant *variant = drvdata->variant; + const struct lpass_variant *variant = drvdata->variant; struct device *dev = &pdev->dev; int ret, i; @@ -252,7 +252,7 @@ static const struct dev_pm_ops sc7280_lpass_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume) }; -static struct lpass_variant sc7280_data = { +static const struct lpass_variant sc7280_data = { .i2sctrl_reg_base = 0x1000, .i2sctrl_reg_stride = 0x1000, .i2s_ports = 3, diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index bdfe66ec3314..aab60540563a 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -139,7 +139,7 @@ struct lpass_data { int vaif_irq; /* SOC specific variations in the LPASS IP integration */ - struct lpass_variant *variant; + const struct lpass_variant *variant; /* bit map to keep track of static channel allocations */ unsigned long dma_ch_bit_map;