constify asoc snd_soc_dai_ops structures
Subsystems (12)
cover constify asoc snd_soc_dai_ops structures
snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
Arvind Yadav (14):
[PATCH 01/14] ASoC: blackfin: constify snd_soc_dai_ops structures [PATCH 02/14] ASoC: codecs: constify snd_soc_dai_ops structures [PATCH 03/14] ASoC: dwc: constify snd_soc_dai_ops structures [PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures [PATCH 05/14] ASoC: hisilicon: constify snd_soc_dai_ops structures [PATCH 06/14] ASoC: intel: constify snd_soc_dai_ops structures [PATCH 07/14] ASoC: mediatek: constify snd_soc_dai_ops structures [PATCH 08/14] ASoC: pxa: constify snd_soc_dai_ops structures [PATCH 09/14] ASoC: rockchip: constify snd_soc_dai_ops structures [PATCH 10/14] ASoC: spear: constify snd_soc_dai_ops structures [PATCH 11/14] ASoC: sunxi: constify snd_soc_dai_ops structures [PATCH 12/14] ASoC: tegra: constify snd_soc_dai_ops structures [PATCH 13/14] ASoC: ux500: constify snd_soc_dai_ops structures [PATCH 14/14] ASoC: zte: constify snd_soc_dai_ops structures
sound/soc/blackfin/bf6xx-i2s.c | 2 +- sound/soc/codecs/cs42l42.c | 2 +- sound/soc/codecs/es8316.c | 2 +- sound/soc/codecs/hdac_hdmi.c | 2 +- sound/soc/codecs/inno_rk3036.c | 2 +- sound/soc/codecs/max9867.c | 2 +- sound/soc/codecs/max98926.c | 2 +- sound/soc/codecs/msm8916-wcd-analog.c | 2 +- sound/soc/codecs/msm8916-wcd-digital.c | 2 +- sound/soc/codecs/rt5616.c | 2 +- sound/soc/codecs/rt5663.c | 2 +- sound/soc/codecs/tas5720.c | 2 +- sound/soc/codecs/zx_aud96p22.c | 2 +- sound/soc/dwc/dwc-i2s.c | 2 +- sound/soc/fsl/fsl_asrc.c | 2 +- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_spdif.c | 2 +- sound/soc/hisilicon/hi6210-i2s.c | 2 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +++--- sound/soc/intel/skylake/skl-pcm.c | 8 ++++---- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 +- sound/soc/pxa/mmp-sspa.c | 2 +- sound/soc/rockchip/rockchip_pdm.c | 2 +- sound/soc/spear/spdif_in.c | 2 +- sound/soc/sunxi/sun8i-codec.c | 2 +- sound/soc/tegra/tegra30_i2s.c | 2 +- sound/soc/ux500/ux500_msp_dai.c | 2 +- sound/soc/zte/zx-i2s.c | 2 +- sound/soc/zte/zx-spdif.c | 2 +- sound/soc/zte/zx-tdm.c | 2 +- 30 files changed, 35 insertions(+), 35 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/14 ASoC: blackfin: constify snd_soc_dai_ops structures
snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/blackfin/bf6xx-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/blackfin/bf6xx-i2s.c +1 -1
@@ -164,7 +164,7 @@ static int bfin_i2s_resume(struct snd_soc_dai *dai)#define BFIN_I2S_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops bfin_i2s_dai_ops = { +static const struct snd_soc_dai_ops bfin_i2s_dai_ops = { .hw_params = bfin_i2s_hw_params, .set_fmt = bfin_i2s_set_dai_fmt, };
Signature · 1 line
1.9.1
Mark Brown
maintainerRe: [PATCH 01/14] ASoC: blackfin: constify snd_soc_dai_ops structures
Quoted 3 lines · Arvind Yadav
snd_soc_dai_opsare not supposed to change at runtime. All functions working withsnd_soc_dai_opsprovided by <sound/soc-dai.h> work with constsnd_soc_dai_ops. So mark the non-const structs as const.
A version of this patch has already been applied.
PATCH 2/14 ASoC: codecs: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/codecs/cs42l42.c | 2 +- sound/soc/codecs/es8316.c | 2 +- sound/soc/codecs/hdac_hdmi.c | 2 +- sound/soc/codecs/inno_rk3036.c | 2 +- sound/soc/codecs/max9867.c | 2 +- sound/soc/codecs/max98926.c | 2 +- sound/soc/codecs/msm8916-wcd-analog.c | 2 +- sound/soc/codecs/msm8916-wcd-digital.c | 2 +- sound/soc/codecs/rt5616.c | 2 +- sound/soc/codecs/rt5663.c | 2 +- sound/soc/codecs/tas5720.c | 2 +- sound/soc/codecs/zx_aud96p22.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
sound/soc/codecs/cs42l42.c +1 -1
@@ -911,7 +911,7 @@ static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute) SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops cs42l42_ops = { +static const struct snd_soc_dai_ops cs42l42_ops = { .hw_params = cs42l42_pcm_hw_params, .set_fmt = cs42l42_set_dai_fmt, .set_sysclk = cs42l42_set_sysclk,
sound/soc/codecs/es8316.c +1 -1
@@ -502,7 +502,7 @@ static int es8316_mute(struct snd_soc_dai *dai, int mute)#define ES8316_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops es8316_ops = { +static const struct snd_soc_dai_ops es8316_ops = { .startup = es8316_pcm_startup, .hw_params = es8316_pcm_hw_params, .set_fmt = es8316_set_dai_fmt,
sound/soc/codecs/hdac_hdmi.c +1 -1
@@ -1360,7 +1360,7 @@ static void hdac_hdmi_skl_enable_dp12(struct hdac_device *hdac) } -static struct snd_soc_dai_ops hdmi_dai_ops = { +static const struct snd_soc_dai_ops hdmi_dai_ops = { .startup = hdac_hdmi_pcm_open, .shutdown = hdac_hdmi_pcm_close, .hw_params = hdac_hdmi_set_hw_params,
sound/soc/codecs/inno_rk3036.c +1 -1
@@ -310,7 +310,7 @@ static int rk3036_codec_dai_hw_params(struct snd_pcm_substream *substream, SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops rk3036_codec_dai_ops = { +static const struct snd_soc_dai_ops rk3036_codec_dai_ops = { .set_fmt = rk3036_codec_dai_set_fmt, .hw_params = rk3036_codec_dai_hw_params, };
sound/soc/codecs/max9867.c +1 -1
@@ -350,7 +350,7 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,return 0 ; } -static struct snd_soc_dai_ops max9867_dai_ops = { +static const struct snd_soc_dai_ops max9867_dai_ops = { .set_fmt = max9867_dai_set_fmt, .set_sysclk = max9867_set_dai_sysclk, .prepare = max9867_prepare,
sound/soc/codecs/max98926.c +1 -1
@@ -459,7 +459,7 @@ static int max98926_dai_hw_params(struct snd_pcm_substream *substream,#define MAX98926_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops max98926_dai_ops = { +static const struct snd_soc_dai_ops max98926_dai_ops = { .set_fmt = max98926_dai_set_fmt, .hw_params = max98926_dai_hw_params, };
sound/soc/codecs/msm8916-wcd-analog.c +1 -1
@@ -753,7 +753,7 @@ static void pm8916_wcd_analog_shutdown(struct snd_pcm_substream *substream, RST_CTL_DIG_SW_RST_N_MASK, 0); } -static struct snd_soc_dai_ops pm8916_wcd_analog_dai_ops = { +static const struct snd_soc_dai_ops pm8916_wcd_analog_dai_ops = { .startup = pm8916_wcd_analog_startup, .shutdown = pm8916_wcd_analog_shutdown, };
sound/soc/codecs/msm8916-wcd-digital.c +1 -1
@@ -788,7 +788,7 @@ static void msm8916_wcd_digital_shutdown(struct snd_pcm_substream *substream, LPASS_CDC_CLK_PDM_CTL_PDM_CLK_SEL_MASK, 0); } -static struct snd_soc_dai_ops msm8916_wcd_digital_dai_ops = { +static const struct snd_soc_dai_ops msm8916_wcd_digital_dai_ops = { .startup = msm8916_wcd_digital_startup, .shutdown = msm8916_wcd_digital_shutdown, .hw_params = msm8916_wcd_digital_hw_params,
sound/soc/codecs/rt5616.c +1 -1
@@ -1265,7 +1265,7 @@ static int rt5616_resume(struct snd_soc_codec *codec)#define RT5616_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt5616_aif_dai_ops = { +static const struct snd_soc_dai_ops rt5616_aif_dai_ops = { .hw_params = rt5616_hw_params, .set_fmt = rt5616_set_dai_fmt, .set_sysclk = rt5616_set_dai_sysclk,
sound/soc/codecs/rt5663.c +1 -1
@@ -2860,7 +2860,7 @@ static int rt5663_resume(struct snd_soc_codec *codec)#define RT5663_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt5663_aif_dai_ops = { +static const struct snd_soc_dai_ops rt5663_aif_dai_ops = { .hw_params = rt5663_hw_params, .set_fmt = rt5663_set_dai_fmt, .set_sysclk = rt5663_set_dai_sysclk,
sound/soc/codecs/tas5720.c +1 -1
@@ -507,7 +507,7 @@ static const DECLARE_TLV_DB_RANGE(dac_analog_tlv,#define TAS5720_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S18_3LE |\ SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops tas5720_speaker_dai_ops = { +static const struct snd_soc_dai_ops tas5720_speaker_dai_ops = { .hw_params = tas5720_hw_params, .set_fmt = tas5720_set_dai_fmt, .set_tdm_slot = tas5720_set_dai_tdm_slot,
sound/soc/codecs/zx_aud96p22.c +1 -1
@@ -312,7 +312,7 @@ static int aud96p22_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return 0 ; } -static struct snd_soc_dai_ops aud96p22_dai_ops = { +static const struct snd_soc_dai_ops aud96p22_dai_ops = { .set_fmt = aud96p22_set_fmt, };
Signature · 1 line
1.9.1
Mark Brown
maintainerRe: [PATCH 02/14] ASoC: codecs: constify snd_soc_dai_ops structures
Quoted 5 lines · Arvind Yadav
sound/soc/codecs/cs42l42.c | 2 +- sound/soc/codecs/es8316.c | 2 +- sound/soc/codecs/hdac_hdmi.c | 2 +- sound/soc/codecs/inno_rk3036.c | 2 +- sound/soc/codecs/max9867.c | 2 +-
Quoted 8 lines
sound/soc/codecs/max98926.c | 2 +- sound/soc/codecs/msm8916-wcd-analog.c | 2 +- sound/soc/codecs/msm8916-wcd-digital.c | 2 +- sound/soc/codecs/rt5616.c | 2 +- sound/soc/codecs/rt5663.c | 2 +- sound/soc/codecs/tas5720.c | 2 +- sound/soc/codecs/zx_aud96p22.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
You sent individual patches for the rest of the drivers but not for any of these... It's fine but some consistency would be nice.
Mark Brown
maintainerApplied "ASoC: codecs: constify snd_soc_dai_ops structures" to the asoc tree
In reply to Arvind YadavThe patch
ASoC: codecs: constify snd_soc_dai_ops structures
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
728c4a87f31d30669a103dac1851a15f4e2af03cMon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Fri, 18 Aug 2017 17:35:59 +0530
Subject: [PATCH] ASoC: codecs: constify snd_soc_dai_ops structures
snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/codecs/cs42l42.c | 2 +- sound/soc/codecs/es8316.c | 2 +- sound/soc/codecs/hdac_hdmi.c | 2 +- sound/soc/codecs/inno_rk3036.c | 2 +- sound/soc/codecs/max9867.c | 2 +- sound/soc/codecs/max98926.c | 2 +- sound/soc/codecs/msm8916-wcd-analog.c | 2 +- sound/soc/codecs/msm8916-wcd-digital.c | 2 +- sound/soc/codecs/rt5616.c | 2 +- sound/soc/codecs/rt5663.c | 2 +- sound/soc/codecs/tas5720.c | 2 +- sound/soc/codecs/zx_aud96p22.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
sound/soc/codecs/cs42l42.c +1 -1
@@ -911,7 +911,7 @@ static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute) SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops cs42l42_ops = { +static const struct snd_soc_dai_ops cs42l42_ops = { .hw_params = cs42l42_pcm_hw_params, .set_fmt = cs42l42_set_dai_fmt, .set_sysclk = cs42l42_set_sysclk,
sound/soc/codecs/es8316.c +1 -1
@@ -502,7 +502,7 @@ static int es8316_mute(struct snd_soc_dai *dai, int mute)#define ES8316_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops es8316_ops = { +static const struct snd_soc_dai_ops es8316_ops = { .startup = es8316_pcm_startup, .hw_params = es8316_pcm_hw_params, .set_fmt = es8316_set_dai_fmt,
sound/soc/codecs/hdac_hdmi.c +1 -1
@@ -1360,7 +1360,7 @@ static void hdac_hdmi_skl_enable_dp12(struct hdac_device *hdac) } -static struct snd_soc_dai_ops hdmi_dai_ops = { +static const struct snd_soc_dai_ops hdmi_dai_ops = { .startup = hdac_hdmi_pcm_open, .shutdown = hdac_hdmi_pcm_close, .hw_params = hdac_hdmi_set_hw_params,
sound/soc/codecs/inno_rk3036.c +1 -1
@@ -310,7 +310,7 @@ static int rk3036_codec_dai_hw_params(struct snd_pcm_substream *substream, SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops rk3036_codec_dai_ops = { +static const struct snd_soc_dai_ops rk3036_codec_dai_ops = { .set_fmt = rk3036_codec_dai_set_fmt, .hw_params = rk3036_codec_dai_hw_params, };
sound/soc/codecs/max9867.c +1 -1
@@ -350,7 +350,7 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,return 0 ; } -static struct snd_soc_dai_ops max9867_dai_ops = { +static const struct snd_soc_dai_ops max9867_dai_ops = { .set_fmt = max9867_dai_set_fmt, .set_sysclk = max9867_set_dai_sysclk, .prepare = max9867_prepare,
sound/soc/codecs/max98926.c +1 -1
@@ -459,7 +459,7 @@ static int max98926_dai_hw_params(struct snd_pcm_substream *substream,#define MAX98926_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops max98926_dai_ops = { +static const struct snd_soc_dai_ops max98926_dai_ops = { .set_fmt = max98926_dai_set_fmt, .hw_params = max98926_dai_hw_params, };
sound/soc/codecs/msm8916-wcd-analog.c +1 -1
@@ -753,7 +753,7 @@ static void pm8916_wcd_analog_shutdown(struct snd_pcm_substream *substream, RST_CTL_DIG_SW_RST_N_MASK, 0); } -static struct snd_soc_dai_ops pm8916_wcd_analog_dai_ops = { +static const struct snd_soc_dai_ops pm8916_wcd_analog_dai_ops = { .startup = pm8916_wcd_analog_startup, .shutdown = pm8916_wcd_analog_shutdown, };
sound/soc/codecs/msm8916-wcd-digital.c +1 -1
@@ -788,7 +788,7 @@ static void msm8916_wcd_digital_shutdown(struct snd_pcm_substream *substream, LPASS_CDC_CLK_PDM_CTL_PDM_CLK_SEL_MASK, 0); } -static struct snd_soc_dai_ops msm8916_wcd_digital_dai_ops = { +static const struct snd_soc_dai_ops msm8916_wcd_digital_dai_ops = { .startup = msm8916_wcd_digital_startup, .shutdown = msm8916_wcd_digital_shutdown, .hw_params = msm8916_wcd_digital_hw_params,
sound/soc/codecs/rt5616.c +1 -1
@@ -1265,7 +1265,7 @@ static int rt5616_resume(struct snd_soc_codec *codec)#define RT5616_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt5616_aif_dai_ops = { +static const struct snd_soc_dai_ops rt5616_aif_dai_ops = { .hw_params = rt5616_hw_params, .set_fmt = rt5616_set_dai_fmt, .set_sysclk = rt5616_set_dai_sysclk,
sound/soc/codecs/rt5663.c +1 -1
@@ -2860,7 +2860,7 @@ static int rt5663_resume(struct snd_soc_codec *codec)#define RT5663_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt5663_aif_dai_ops = { +static const struct snd_soc_dai_ops rt5663_aif_dai_ops = { .hw_params = rt5663_hw_params, .set_fmt = rt5663_set_dai_fmt, .set_sysclk = rt5663_set_dai_sysclk,
sound/soc/codecs/tas5720.c +1 -1
@@ -507,7 +507,7 @@ static struct snd_soc_codec_driver soc_codec_dev_tas5720 = {#define TAS5720_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S18_3LE |\ SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops tas5720_speaker_dai_ops = { +static const struct snd_soc_dai_ops tas5720_speaker_dai_ops = { .hw_params = tas5720_hw_params, .set_fmt = tas5720_set_dai_fmt, .set_tdm_slot = tas5720_set_dai_tdm_slot,
sound/soc/codecs/zx_aud96p22.c +1 -1
@@ -312,7 +312,7 @@ static int aud96p22_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)return 0 ; } -static struct snd_soc_dai_ops aud96p22_dai_ops = { +static const struct snd_soc_dai_ops aud96p22_dai_ops = { .set_fmt = aud96p22_set_fmt, };
Signature · 1 line
2.13.2
PATCH 3/14 ASoC: dwc: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/dwc/dwc-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/dwc/dwc-i2s.c +1 -1
@@ -381,7 +381,7 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)return ret; } -static struct snd_soc_dai_ops dw_i2s_dai_ops = { +static const struct snd_soc_dai_ops dw_i2s_dai_ops = { .startup = dw_i2s_startup, .shutdown = dw_i2s_shutdown, .hw_params = dw_i2s_hw_params,
Signature · 1 line
1.9.1
Mark Brown
maintainerRe: [PATCH 03/14] ASoC: dwc: constify snd_soc_dai_ops structures
Quoted 3 lines · Arvind Yadav
snd_soc_dai_opsare not supposed to change at runtime. All functions working withsnd_soc_dai_opsprovided by <sound/soc-dai.h> work with constsnd_soc_dai_ops. So mark the non-const structs as const.
A version of this has also already been applied...
PATCH 4/14 ASoC: fsl: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/fsl/fsl_asrc.c | 2 +- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_spdif.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/fsl/fsl_asrc.c +1 -1
@@ -542,7 +542,7 @@ static int fsl_asrc_dai_trigger(struct snd_pcm_substream *substream, int cmd,return 0 ; } -static struct snd_soc_dai_ops fsl_asrc_dai_ops = { +static const struct snd_soc_dai_ops fsl_asrc_dai_ops = { .hw_params = fsl_asrc_dai_hw_params, .hw_free = fsl_asrc_dai_hw_free, .trigger = fsl_asrc_dai_trigger,
sound/soc/fsl/fsl_esai.c +1 -1
@@ -620,7 +620,7 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,return 0 ; } -static struct snd_soc_dai_ops fsl_esai_dai_ops = { +static const struct snd_soc_dai_ops fsl_esai_dai_ops = { .startup = fsl_esai_startup, .shutdown = fsl_esai_shutdown, .trigger = fsl_esai_trigger,
sound/soc/fsl/fsl_spdif.c +1 -1
@@ -626,7 +626,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_dai_ops fsl_spdif_dai_ops = { +static const struct snd_soc_dai_ops fsl_spdif_dai_ops = { .startup = fsl_spdif_startup, .hw_params = fsl_spdif_hw_params, .trigger = fsl_spdif_trigger,
Signature · 1 line
1.9.1
Mark Brown
maintainerRe: [PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures
Quoted 3 lines · Arvind Yadav
snd_soc_dai_opsare not supposed to change at runtime. All functions working withsnd_soc_dai_opsprovided by <sound/soc-dai.h> work with constsnd_soc_dai_ops. So mark the non-const structs as const.
Same here...
PATCH 5/14 ASoC: hisilicon: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/hisilicon/hi6210-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/hisilicon/hi6210-i2s.c +1 -1
@@ -517,7 +517,7 @@ static int hi6210_i2s_dai_probe(struct snd_soc_dai *dai) } -static struct snd_soc_dai_ops hi6210_i2s_dai_ops = { +static const struct snd_soc_dai_ops hi6210_i2s_dai_ops = { .trigger = hi6210_i2s_trigger, .hw_params = hi6210_i2s_hw_params, .set_fmt = hi6210_i2s_set_fmt,
Signature · 1 line
1.9.1
Mark Brown
maintainerRe: [PATCH 05/14] ASoC: hisilicon: constify snd_soc_dai_ops structures
Quoted 3 lines · Arvind Yadav
snd_soc_dai_opsare not supposed to change at runtime. All functions working withsnd_soc_dai_opsprovided by <sound/soc-dai.h> work with constsnd_soc_dai_ops. So mark the non-const structs as const.
...and this. I'll not reply to any of the others in the series but I'm guessing there'll be a bunch of others.
PATCH 6/14 ASoC: intel: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +++--- sound/soc/intel/skylake/skl-pcm.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
sound/soc/intel/atom/sst-mfld-platform-pcm.c +3 -3
@@ -471,7 +471,7 @@ static void sst_disable_ssp(struct snd_pcm_substream *substream, } } -static struct snd_soc_dai_ops sst_media_dai_ops = { +static const struct snd_soc_dai_ops sst_media_dai_ops = { .startup = sst_media_open, .shutdown = sst_media_close, .prepare = sst_media_prepare,
@@ -480,11 +480,11 @@ static void sst_disable_ssp(struct snd_pcm_substream *substream, .mute_stream = sst_media_digital_mute, }; -static struct snd_soc_dai_ops sst_compr_dai_ops = { +static const struct snd_soc_dai_ops sst_compr_dai_ops = { .mute_stream = sst_media_digital_mute, }; -static struct snd_soc_dai_ops sst_be_dai_ops = { +static const struct snd_soc_dai_ops sst_be_dai_ops = { .startup = sst_enable_ssp, .hw_params = sst_be_hw_params, .set_fmt = sst_set_format,
sound/soc/intel/skylake/skl-pcm.c +4 -4
@@ -628,7 +628,7 @@ static int skl_link_hw_free(struct snd_pcm_substream *substream,return 0 ; } -static struct snd_soc_dai_ops skl_pcm_dai_ops = { +static const struct snd_soc_dai_ops skl_pcm_dai_ops = { .startup = skl_pcm_open, .shutdown = skl_pcm_close, .prepare = skl_pcm_prepare,
@@ -637,15 +637,15 @@ static int skl_link_hw_free(struct snd_pcm_substream *substream, .trigger = skl_pcm_trigger, }; -static struct snd_soc_dai_ops skl_dmic_dai_ops = { +static const struct snd_soc_dai_ops skl_dmic_dai_ops = { .hw_params = skl_be_hw_params, }; -static struct snd_soc_dai_ops skl_be_ssp_dai_ops = { +static const struct snd_soc_dai_ops skl_be_ssp_dai_ops = { .hw_params = skl_be_hw_params, }; -static struct snd_soc_dai_ops skl_link_dai_ops = { +static const struct snd_soc_dai_ops skl_link_dai_ops = { .prepare = skl_link_pcm_prepare, .hw_params = skl_link_hw_params, .hw_free = skl_link_hw_free,
Signature · 1 line
1.9.1
PATCH 7/14 ASoC: mediatek: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +1 -1
@@ -595,7 +595,7 @@ static int mt2701_irq_fs(struct snd_pcm_substream *substream, unsigned int rate) };/* MRG BE DAIs */ -static struct snd_soc_dai_ops mt2701_btmrg_ops = { +static const struct snd_soc_dai_ops mt2701_btmrg_ops = { .startup = mt2701_btmrg_startup, .shutdown = mt2701_btmrg_shutdown, .hw_params = mt2701_btmrg_hw_params,
Signature · 1 line
1.9.1
PATCH 8/14 ASoC: pxa: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/pxa/mmp-sspa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/pxa/mmp-sspa.c +1 -1
@@ -380,7 +380,7 @@ static int mmp_sspa_probe(struct snd_soc_dai *dai) SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops mmp_sspa_dai_ops = { +static const struct snd_soc_dai_ops mmp_sspa_dai_ops = { .startup = mmp_sspa_startup, .shutdown = mmp_sspa_shutdown, .trigger = mmp_sspa_trigger,
Signature · 1 line
1.9.1
PATCH 9/14 ASoC: rockchip: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/rockchip/rockchip_pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/rockchip/rockchip_pdm.c +1 -1
@@ -249,7 +249,7 @@ static int rockchip_pdm_dai_probe(struct snd_soc_dai *dai)return 0 ; } -static struct snd_soc_dai_ops rockchip_pdm_dai_ops = { +static const struct snd_soc_dai_ops rockchip_pdm_dai_ops = { .set_fmt = rockchip_pdm_set_fmt, .trigger = rockchip_pdm_trigger, .hw_params = rockchip_pdm_hw_params,
Signature · 1 line
1.9.1
PATCH 10/14 ASoC: spear: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/spear/spdif_in.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/spear/spdif_in.c +1 -1
@@ -151,7 +151,7 @@ static int spdif_in_trigger(struct snd_pcm_substream *substream, int cmd,return ret; } -static struct snd_soc_dai_ops spdif_in_dai_ops = { +static const struct snd_soc_dai_ops spdif_in_dai_ops = { .shutdown = spdif_in_shutdown, .trigger = spdif_in_trigger, .hw_params = spdif_in_hw_params,
Signature · 1 line
1.9.1
PATCH 11/14 ASoC: sunxi: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/sunxi/sun8i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sunxi/sun8i-codec.c +1 -1
@@ -341,7 +341,7 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream, "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, };
Signature · 1 line
1.9.1
PATCH 12/14 ASoC: tegra: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/tegra/tegra30_i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/tegra/tegra30_i2s.c +1 -1
@@ -275,7 +275,7 @@ static int tegra30_i2s_probe(struct snd_soc_dai *dai)return 0 ; } -static struct snd_soc_dai_ops tegra30_i2s_dai_ops = { +static const struct snd_soc_dai_ops tegra30_i2s_dai_ops = { .set_fmt = tegra30_i2s_set_fmt, .hw_params = tegra30_i2s_hw_params, .trigger = tegra30_i2s_trigger,
Signature · 1 line
1.9.1
PATCH 13/14 ASoC: ux500: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/ux500/ux500_msp_dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/ux500/ux500_msp_dai.c +1 -1
@@ -707,7 +707,7 @@ static int ux500_msp_dai_probe(struct snd_soc_dai *dai)return 0 ; } -static struct snd_soc_dai_ops ux500_msp_dai_ops[] = { +static const struct snd_soc_dai_ops ux500_msp_dai_ops[] = { { .set_sysclk = ux500_msp_dai_set_dai_sysclk, .set_fmt = ux500_msp_dai_set_dai_fmt,
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: ux500: constify snd_soc_dai_ops structures" to the asoc tree
The patch
ASoC: ux500: constify snd_soc_dai_ops structures
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
ab566fd52309971da595af057fd480aed82ca0e2Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Fri, 18 Aug 2017 17:36:10 +0530
Subject: [PATCH] ASoC: ux500: constify snd_soc_dai_ops structures
snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/ux500/ux500_msp_dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/ux500/ux500_msp_dai.c +1 -1
@@ -707,7 +707,7 @@ static int ux500_msp_dai_probe(struct snd_soc_dai *dai)return 0 ; } -static struct snd_soc_dai_ops ux500_msp_dai_ops[] = { +static const struct snd_soc_dai_ops ux500_msp_dai_ops[] = { { .set_sysclk = ux500_msp_dai_set_dai_sysclk, .set_fmt = ux500_msp_dai_set_dai_fmt,
Signature · 1 line
2.13.2
PATCH 14/14 ASoC: zte: constify snd_soc_dai_ops structures
In reply to Arvind Yadavsnd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const.
--- sound/soc/zte/zx-i2s.c | 2 +- sound/soc/zte/zx-spdif.c | 2 +- sound/soc/zte/zx-tdm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/zte/zx-i2s.c +1 -1
@@ -357,7 +357,7 @@ static void zx_i2s_shutdown(struct snd_pcm_substream *substream,clk_disable_unprepare (zx_i2s->dai_pclk); } -static struct snd_soc_dai_ops zx_i2s_dai_ops = { +static const struct snd_soc_dai_ops zx_i2s_dai_ops = { .trigger = zx_i2s_trigger, .hw_params = zx_i2s_hw_params, .set_fmt = zx_i2s_set_fmt,
sound/soc/zte/zx-spdif.c +1 -1
@@ -264,7 +264,7 @@ static void zx_spdif_shutdown(struct snd_pcm_substream *substream, (SNDRV_PCM_FMTBIT_S16_LE |SNDRV_PCM_FMTBIT_S18_3LE \ | SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops zx_spdif_dai_ops = { +static const struct snd_soc_dai_ops zx_spdif_dai_ops = { .trigger = zx_spdif_trigger, .startup = zx_spdif_startup, .shutdown = zx_spdif_shutdown,
sound/soc/zte/zx-tdm.c +1 -1
@@ -309,7 +309,7 @@ static void zx_tdm_shutdown(struct snd_pcm_substream *substream,clk_disable_unprepare (zx_tdm->dai_wclk); } -static struct snd_soc_dai_ops zx_tdm_dai_ops = { +static const struct snd_soc_dai_ops zx_tdm_dai_ops = { .trigger = zx_tdm_trigger, .hw_params = zx_tdm_hw_params, .set_fmt = zx_tdm_set_fmt,
Signature · 1 line
1.9.1