* [PATCH] ASoC: sun8i-codec: constify snd_soc_dai_ops structure
@ 2017-07-13 5:52 Gustavo A. R. Silva
2017-07-13 6:35 ` Maxime Ripard
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 5:52 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Maxime Ripard, Chen-Yu Tsai
Cc: alsa-devel, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/sunxi/sun8i-codec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 5723c34..253ae0b 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -341,7 +341,7 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
"AIF1 Slot 0 Right"},
};
-static struct snd_soc_dai_ops sun8i_codec_dai_ops = {
+static const struct snd_soc_dai_ops sun8i_codec_dai_ops = {
.hw_params = sun8i_codec_hw_params,
.set_fmt = sun8i_set_fmt,
};
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: sun8i-codec: constify snd_soc_dai_ops structure
2017-07-13 5:52 [PATCH] ASoC: sun8i-codec: constify snd_soc_dai_ops structure Gustavo A. R. Silva
@ 2017-07-13 6:35 ` Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2017-07-13 6:35 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Chen-Yu Tsai, alsa-devel, linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
On Thu, Jul 13, 2017 at 12:52:23AM -0500, Gustavo A. R. Silva wrote:
> This structure is only stored in the ops field of a snd_soc_dai_driver
> structure. That field is declared const, so snd_soc_dai_ops structures
> that have this property can be declared as const also.
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-13 6:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-13 5:52 [PATCH] ASoC: sun8i-codec: constify snd_soc_dai_ops structure Gustavo A. R. Silva
2017-07-13 6:35 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox