ASoC: samsung: constify snd_soc_ops structures
Subsystems (3)
PATCH 1/1 ASoC: samsung: 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.
Cross compiled the files arndale_rt5631.o, h1940_uda1380.o, jive_wm8750.o, littlemill.o, neo1973_wm8753.o and rx1950_uda1380.o for arm architecture.
--- sound/soc/samsung/arndale_rt5631.c | 2 +- sound/soc/samsung/h1940_uda1380.c | 2 +- sound/soc/samsung/jive_wm8750.c | 2 +- sound/soc/samsung/littlemill.c | 2 +- sound/soc/samsung/neo1973_wm8753.c | 2 +- sound/soc/samsung/rx1950_uda1380.c | 2 +- sound/soc/samsung/s3c24xx_simtec.c | 2 +- sound/soc/samsung/s3c24xx_uda134x.c | 2 +- sound/soc/samsung/smartq_wm8987.c | 2 +- sound/soc/samsung/smdk_spdif.c | 2 +- sound/soc/samsung/smdk_wm8580.c | 2 +- sound/soc/samsung/smdk_wm8994.c | 2 +- sound/soc/samsung/smdk_wm8994pcm.c | 2 +- sound/soc/samsung/tm2_wm5110.c | 2 +- sound/soc/samsung/tobermory.c | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)
sound/soc/samsung/arndale_rt5631.c +1 -1
@@ -53,7 +53,7 @@ static int arndale_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_ops arndale_ops = { +static const struct snd_soc_ops arndale_ops = { .hw_params = arndale_hw_params, };
sound/soc/samsung/h1940_uda1380.c +1 -1
@@ -120,7 +120,7 @@ static int h1940_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_ops h1940_ops = { +static const struct snd_soc_ops h1940_ops = { .startup = h1940_startup, .hw_params = h1940_hw_params, };
sound/soc/samsung/jive_wm8750.c +1 -1
@@ -79,7 +79,7 @@ static int jive_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_ops jive_ops = { +static const struct snd_soc_ops jive_ops = { .hw_params = jive_hw_params, };
sound/soc/samsung/littlemill.c +1 -1
@@ -135,7 +135,7 @@ static int littlemill_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_ops littlemill_ops = { +static const struct snd_soc_ops littlemill_ops = { .hw_params = littlemill_hw_params, };
sound/soc/samsung/neo1973_wm8753.c +1 -1
@@ -114,7 +114,7 @@ static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream)/* * Neo1973 WM8753 HiFi DAI opserations. */ -static struct snd_soc_ops neo1973_hifi_ops = { +static const struct snd_soc_ops neo1973_hifi_ops = { .hw_params = neo1973_hifi_hw_params, .hw_free = neo1973_hifi_hw_free, };
sound/soc/samsung/rx1950_uda1380.c +1 -1
@@ -73,7 +73,7 @@ static struct snd_soc_jack_gpio hp_jack_gpios[] = { }, }; -static struct snd_soc_ops rx1950_ops = { +static const struct snd_soc_ops rx1950_ops = { .startup = rx1950_startup, .hw_params = rx1950_hw_params, };
sound/soc/samsung/s3c24xx_simtec.c +1 -1
@@ -211,7 +211,7 @@ static int simtec_call_startup(struct s3c24xx_audio_simtec_pdata *pd)return 0 ; } -static struct snd_soc_ops simtec_snd_ops = { +static const struct snd_soc_ops simtec_snd_ops = { .hw_params = simtec_hw_params, };
sound/soc/samsung/s3c24xx_uda134x.c +1 -1
@@ -199,7 +199,7 @@ static int s3c24xx_uda134x_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_ops s3c24xx_uda134x_ops = { +static const struct snd_soc_ops s3c24xx_uda134x_ops = { .startup = s3c24xx_uda134x_startup, .shutdown = s3c24xx_uda134x_shutdown, .hw_params = s3c24xx_uda134x_hw_params,
sound/soc/samsung/smartq_wm8987.c +1 -1
@@ -77,7 +77,7 @@ static int smartq_hifi_hw_params(struct snd_pcm_substream *substream,/* * SmartQ WM8987 HiFi DAI operations. */ -static struct snd_soc_ops smartq_hifi_ops = { +static const struct snd_soc_ops smartq_hifi_ops = { .hw_params = smartq_hifi_hw_params, };
sound/soc/samsung/smdk_spdif.c +1 -1
@@ -144,7 +144,7 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,return ret; } -static struct snd_soc_ops smdk_spdif_ops = { +static const struct snd_soc_ops smdk_spdif_ops = { .hw_params = smdk_hw_params, };
sound/soc/samsung/smdk_wm8580.c +1 -1
@@ -93,7 +93,7 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,/* * SMDK WM8580 DAI operations. */ -static struct snd_soc_ops smdk_ops = { +static const struct snd_soc_ops smdk_ops = { .hw_params = smdk_hw_params, };
sound/soc/samsung/smdk_wm8994.c +1 -1
@@ -80,7 +80,7 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,/* * SMDK WM8994 DAI operations. */ -static struct snd_soc_ops smdk_ops = { +static const struct snd_soc_ops smdk_ops = { .hw_params = smdk_hw_params, };
sound/soc/samsung/smdk_wm8994pcm.c +1 -1
@@ -91,7 +91,7 @@ static int smdk_wm8994_pcm_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_ops smdk_wm8994_pcm_ops = { +static const struct snd_soc_ops smdk_wm8994_pcm_ops = { .hw_params = smdk_wm8994_pcm_hw_params, };
sound/soc/samsung/tm2_wm5110.c +1 -1
@@ -131,7 +131,7 @@ static int tm2_aif1_hw_params(struct snd_pcm_substream *substream,return tm2_start_sysclk (rtd->card); } -static struct snd_soc_ops tm2_aif1_ops = { +static const struct snd_soc_ops tm2_aif1_ops = { .hw_params = tm2_aif1_hw_params, };
sound/soc/samsung/tobermory.c +1 -1
@@ -110,7 +110,7 @@ static int tobermory_hw_params(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_ops tobermory_ops = { +static const struct snd_soc_ops tobermory_ops = { .hw_params = tobermory_hw_params, };
Signature · 1 line
2.7.4
Quoted 18 lines · Bhumika Goyal
Declare
snd_soc_opsstructures as const as they are only stored in the ops field of asnd_soc_dai_linkstructure. This field is of type const, sosnd_soc_opsstructures having this property can be made const too.Cross compiled the files arndale_rt5631.o, h1940_uda1380.o, jive_wm8750.o, littlemill.o, neo1973_wm8753.o and rx1950_uda1380.o for arm architecture.
Signed-off-by Bhumika Goyal <[email protected]>--- sound/soc/samsung/arndale_rt5631.c | 2 +- sound/soc/samsung/h1940_uda1380.c | 2 +- sound/soc/samsung/jive_wm8750.c | 2 +- sound/soc/samsung/littlemill.c | 2 +- sound/soc/samsung/neo1973_wm8753.c | 2 +- sound/soc/samsung/rx1950_uda1380.c | 2 +- sound/soc/samsung/s3c24xx_simtec.c | 2 +- sound/soc/samsung/s3c24xx_uda134x.c | 2 +-
Quoted 9 lines
sound/soc/samsung/smartq_wm8987.c | 2 +- sound/soc/samsung/smdk_spdif.c | 2 +- sound/soc/samsung/smdk_wm8580.c | 2 +- sound/soc/samsung/smdk_wm8994.c | 2 +- sound/soc/samsung/smdk_wm8994pcm.c | 2 +- sound/soc/samsung/tm2_wm5110.c | 2 +- sound/soc/samsung/tobermory.c | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)
Best regards,
Krzysztof