ASoC: omap: constify snd_soc_ops structures
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 18 Mar 2017 14:04:11 +0000 (19:34 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 20 Mar 2017 11:26:37 +0000 (11:26 +0000)
Declare snd_soc_ops structures as const as they are only stored
in the ops field of a snd_soc_dai_link structure. This field is
of type const, so snd_soc_ops structures having this property
can be made const too.

Cross compiled the .o files for arm architecture.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/omap/am3517evm.c
sound/soc/omap/n810.c
sound/soc/omap/omap-abe-twl6040.c
sound/soc/omap/omap-twl4030.c
sound/soc/omap/omap3pandora.c
sound/soc/omap/osk5912.c
sound/soc/omap/rx51.c

index 25a33e9..d565102 100644 (file)
@@ -49,7 +49,7 @@ static int am3517evm_hw_params(struct snd_pcm_substream *substream,
        return ret;
 }
 
-static struct snd_soc_ops am3517evm_ops = {
+static const struct snd_soc_ops am3517evm_ops = {
        .hw_params = am3517evm_hw_params,
 };
 
index fdecb70..71e5f31 100644 (file)
@@ -124,7 +124,7 @@ static int n810_hw_params(struct snd_pcm_substream *substream,
        return err;
 }
 
-static struct snd_soc_ops n810_ops = {
+static const struct snd_soc_ops n810_ops = {
        .startup = n810_startup,
        .hw_params = n810_hw_params,
        .shutdown = n810_shutdown,
index 89fe95e..614b18d 100644 (file)
@@ -70,7 +70,7 @@ static int omap_abe_hw_params(struct snd_pcm_substream *substream,
        return ret;
 }
 
-static struct snd_soc_ops omap_abe_ops = {
+static const struct snd_soc_ops omap_abe_ops = {
        .hw_params = omap_abe_hw_params,
 };
 
index 7431314..a24b0de 100644 (file)
@@ -73,7 +73,7 @@ static int omap_twl4030_hw_params(struct snd_pcm_substream *substream,
        return snd_soc_runtime_set_dai_fmt(rtd, fmt);
 }
 
-static struct snd_soc_ops omap_twl4030_ops = {
+static const struct snd_soc_ops omap_twl4030_ops = {
        .hw_params = omap_twl4030_hw_params,
 };
 
index 732e749..4e3de71 100644 (file)
@@ -184,7 +184,7 @@ static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static struct snd_soc_ops omap3pandora_ops = {
+static const struct snd_soc_ops omap3pandora_ops = {
        .hw_params = omap3pandora_hw_params,
 };
 
index aa4053b..e409677 100644 (file)
@@ -68,7 +68,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream,
        return err;
 }
 
-static struct snd_soc_ops osk_ops = {
+static const struct snd_soc_ops osk_ops = {
        .startup = osk_startup,
        .hw_params = osk_hw_params,
        .shutdown = osk_shutdown,
index 086b59b..3aeb65f 100644 (file)
@@ -123,7 +123,7 @@ static int rx51_hw_params(struct snd_pcm_substream *substream,
                                      SND_SOC_CLOCK_IN);
 }
 
-static struct snd_soc_ops rx51_ops = {
+static const struct snd_soc_ops rx51_ops = {
        .startup = rx51_startup,
        .hw_params = rx51_hw_params,
 };