浏览代码

ASoC: pxa: constify snd_soc_ops structures

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.

The .o files did not compile for all the changed .c files.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Bhumika Goyal 8 年之前
父节点
当前提交
943b73112d

+ 1 - 1
sound/soc/pxa/brownstone.c

@@ -74,7 +74,7 @@ static int brownstone_wm8994_hw_params(struct snd_pcm_substream *substream,
 }
 }
 
 
 /* machine stream operations */
 /* machine stream operations */
-static struct snd_soc_ops brownstone_ops = {
+static const struct snd_soc_ops brownstone_ops = {
 	.hw_params = brownstone_wm8994_hw_params,
 	.hw_params = brownstone_wm8994_hw_params,
 };
 };
 
 

+ 1 - 1
sound/soc/pxa/corgi.c

@@ -154,7 +154,7 @@ static int corgi_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops corgi_ops = {
+static const struct snd_soc_ops corgi_ops = {
 	.startup = corgi_startup,
 	.startup = corgi_startup,
 	.hw_params = corgi_hw_params,
 	.hw_params = corgi_hw_params,
 	.shutdown = corgi_shutdown,
 	.shutdown = corgi_shutdown,

+ 1 - 1
sound/soc/pxa/hx4700.c

@@ -79,7 +79,7 @@ static int hx4700_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops hx4700_ops = {
+static const struct snd_soc_ops hx4700_ops = {
 	.hw_params = hx4700_hw_params,
 	.hw_params = hx4700_hw_params,
 };
 };
 
 

+ 1 - 1
sound/soc/pxa/imote2.c

@@ -42,7 +42,7 @@ static int imote2_asoc_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 	return ret;
 }
 }
 
 
-static struct snd_soc_ops imote2_asoc_ops = {
+static const struct snd_soc_ops imote2_asoc_ops = {
 	.hw_params = imote2_asoc_hw_params,
 	.hw_params = imote2_asoc_hw_params,
 };
 };
 
 

+ 2 - 2
sound/soc/pxa/magician.c

@@ -255,12 +255,12 @@ static int magician_capture_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops magician_capture_ops = {
+static const struct snd_soc_ops magician_capture_ops = {
 	.startup = magician_startup,
 	.startup = magician_startup,
 	.hw_params = magician_capture_hw_params,
 	.hw_params = magician_capture_hw_params,
 };
 };
 
 
-static struct snd_soc_ops magician_playback_ops = {
+static const struct snd_soc_ops magician_playback_ops = {
 	.startup = magician_startup,
 	.startup = magician_startup,
 	.hw_params = magician_playback_hw_params,
 	.hw_params = magician_playback_hw_params,
 };
 };

+ 1 - 1
sound/soc/pxa/poodle.c

@@ -129,7 +129,7 @@ static int poodle_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops poodle_ops = {
+static const struct snd_soc_ops poodle_ops = {
 	.startup = poodle_startup,
 	.startup = poodle_startup,
 	.hw_params = poodle_hw_params,
 	.hw_params = poodle_hw_params,
 	.shutdown = poodle_shutdown,
 	.shutdown = poodle_shutdown,

+ 1 - 1
sound/soc/pxa/raumfeld.c

@@ -132,7 +132,7 @@ static int raumfeld_cs4270_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops raumfeld_cs4270_ops = {
+static const struct snd_soc_ops raumfeld_cs4270_ops = {
 	.startup = raumfeld_cs4270_startup,
 	.startup = raumfeld_cs4270_startup,
 	.shutdown = raumfeld_cs4270_shutdown,
 	.shutdown = raumfeld_cs4270_shutdown,
 	.hw_params = raumfeld_cs4270_hw_params,
 	.hw_params = raumfeld_cs4270_hw_params,

+ 1 - 1
sound/soc/pxa/spitz.c

@@ -156,7 +156,7 @@ static int spitz_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops spitz_ops = {
+static const struct snd_soc_ops spitz_ops = {
 	.startup = spitz_startup,
 	.startup = spitz_startup,
 	.hw_params = spitz_hw_params,
 	.hw_params = spitz_hw_params,
 };
 };

+ 1 - 1
sound/soc/pxa/tosa.c

@@ -85,7 +85,7 @@ static int tosa_startup(struct snd_pcm_substream *substream)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops tosa_ops = {
+static const struct snd_soc_ops tosa_ops = {
 	.startup = tosa_startup,
 	.startup = tosa_startup,
 };
 };
 
 

+ 1 - 1
sound/soc/pxa/z2.c

@@ -152,7 +152,7 @@ err:
 	return ret;
 	return ret;
 }
 }
 
 
-static struct snd_soc_ops z2_ops = {
+static const struct snd_soc_ops z2_ops = {
 	.hw_params = z2_hw_params,
 	.hw_params = z2_hw_params,
 };
 };
 
 

+ 1 - 1
sound/soc/pxa/zylonite.c

@@ -132,7 +132,7 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 	return 0;
 }
 }
 
 
-static struct snd_soc_ops zylonite_voice_ops = {
+static const struct snd_soc_ops zylonite_voice_ops = {
 	.hw_params = zylonite_voice_hw_params,
 	.hw_params = zylonite_voice_hw_params,
 };
 };