ASoC: Constify snd_soc_dai_ops structs
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure") introduced the possibility to have constant DAI ops structures, yet this is barley used in both existing drivers and also new drivers being submitted, although none of them modifies its DAI ops structure. The later is not surprising since existing drivers are often used as templates for new drivers. So this patch just constifies all existing snd_soc_dai_ops structs to eliminate the issue altogether. The patch was generated with the following coccinelle semantic patch: // <smpl> @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Mark Brown

vecāks
bea0ed0825
revīzija
85e7652d89
@@ -2531,7 +2531,7 @@ static int wm8994_aif2_probe(struct snd_soc_dai *dai)
|
||||
#define WM8994_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
|
||||
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
|
||||
|
||||
static struct snd_soc_dai_ops wm8994_aif1_dai_ops = {
|
||||
static const struct snd_soc_dai_ops wm8994_aif1_dai_ops = {
|
||||
.set_sysclk = wm8994_set_dai_sysclk,
|
||||
.set_fmt = wm8994_set_dai_fmt,
|
||||
.hw_params = wm8994_hw_params,
|
||||
@@ -2541,7 +2541,7 @@ static struct snd_soc_dai_ops wm8994_aif1_dai_ops = {
|
||||
.set_tristate = wm8994_set_tristate,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_ops wm8994_aif2_dai_ops = {
|
||||
static const struct snd_soc_dai_ops wm8994_aif2_dai_ops = {
|
||||
.set_sysclk = wm8994_set_dai_sysclk,
|
||||
.set_fmt = wm8994_set_dai_fmt,
|
||||
.hw_params = wm8994_hw_params,
|
||||
@@ -2551,7 +2551,7 @@ static struct snd_soc_dai_ops wm8994_aif2_dai_ops = {
|
||||
.set_tristate = wm8994_set_tristate,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_ops wm8994_aif3_dai_ops = {
|
||||
static const struct snd_soc_dai_ops wm8994_aif3_dai_ops = {
|
||||
.hw_params = wm8994_aif3_hw_params,
|
||||
.set_tristate = wm8994_set_tristate,
|
||||
};
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user