public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] constify snd_soc_dai_ops structures
@ 2017-07-13 20:37 Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 01/12] ASoC: cs42l42: constify snd_soc_dai_ops structure Gustavo A. R. Silva
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:37 UTC (permalink / raw)
  To: linux-kernel
  Cc: alsa-devel, Gustavo A. R. Silva, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Brian Austin, Paul Handrigan,
	Oder Chiou, Bard Liao

This patchset aims to constify all snd_soc_dai_ops structures that
are only stored in the ops field of a snd_soc_dai_driver structure.
That field is declared const, so snd_soc_dai_ops structures that have
this property can be declared as const also.

Thanks!

Gustavo A. R. Silva (12):
  ASoC: cs42l42: constify snd_soc_dai_ops structure
  ASoC: rt5663: constify snd_soc_dai_ops structure
  ASoC: rt5616: constify snd_soc_dai_ops structure
  ASoC: msm8916-wcd-analog: constify snd_soc_dai_ops structure
  ASoC: max98926: constify snd_soc_dai_ops structure
  ASoC: rt5514: constify snd_soc_dai_ops structure
  ASoC: codecs: msm8916-wcd-digital: constify snd_soc_dai_ops structure
  ASoC: max9867: constify snd_soc_dai_ops structure
  ASoC: rk3036: constify snd_soc_dai_ops structure
  ASoC: hdac_hdmi: constify snd_soc_dai_ops structure
  ASoC: dwc: constify snd_soc_dai_ops structure
  ASoC: tas5720: constify snd_soc_dai_ops structure

 sound/soc/codecs/cs42l42.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/rt5514.c              | 2 +-
 sound/soc/codecs/rt5616.c              | 2 +-
 sound/soc/codecs/rt5663.c              | 2 +-
 sound/soc/codecs/tas5720.c             | 2 +-
 sound/soc/dwc/dwc-i2s.c                | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 01/12] ASoC: cs42l42: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
@ 2017-07-13 20:37 ` Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 02/12] ASoC: rt5663: " Gustavo A. R. Silva
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:37 UTC (permalink / raw)
  To: Brian Austin, Paul Handrigan, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/cs42l42.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index 55e4520..9e860df 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 02/12] ASoC: rt5663: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 01/12] ASoC: cs42l42: constify snd_soc_dai_ops structure Gustavo A. R. Silva
@ 2017-07-13 20:37 ` Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 03/12] ASoC: rt5616: " Gustavo A. R. Silva
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:37 UTC (permalink / raw)
  To: Oder Chiou, Bard Liao, Jaroslav Kysela, Takashi Iwai,
	Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/rt5663.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index ac6dd25..b262b6f 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -2888,7 +2888,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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 03/12] ASoC: rt5616: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 01/12] ASoC: cs42l42: constify snd_soc_dai_ops structure Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 02/12] ASoC: rt5663: " Gustavo A. R. Silva
@ 2017-07-13 20:37 ` Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 04/12] ASoC: msm8916-wcd-analog: " Gustavo A. R. Silva
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:37 UTC (permalink / raw)
  To: Oder Chiou, Bard Liao, Jaroslav Kysela, Takashi Iwai,
	Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/rt5616.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index 7d6e082..33bdfe7 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 04/12] ASoC: msm8916-wcd-analog: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (2 preceding siblings ...)
  2017-07-13 20:37 ` [PATCH 03/12] ASoC: rt5616: " Gustavo A. R. Silva
@ 2017-07-13 20:37 ` Gustavo A. R. Silva
  2017-07-13 20:37 ` [PATCH 05/12] ASoC: max98926: " Gustavo A. R. Silva
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:37 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/msm8916-wcd-analog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index a788029..aec1e16 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -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,
 };
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 05/12] ASoC: max98926: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (3 preceding siblings ...)
  2017-07-13 20:37 ` [PATCH 04/12] ASoC: msm8916-wcd-analog: " Gustavo A. R. Silva
@ 2017-07-13 20:37 ` Gustavo A. R. Silva
  2017-07-13 20:38 ` [PATCH 07/12] ASoC: codecs: msm8916-wcd-digital: " Gustavo A. R. Silva
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:37 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Mark Brown, Liam Girdwood
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/max98926.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c
index 1eff7e0..f16145d8 100644
--- a/sound/soc/codecs/max98926.c
+++ b/sound/soc/codecs/max98926.c
@@ -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,
 };
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 07/12] ASoC: codecs: msm8916-wcd-digital: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (4 preceding siblings ...)
  2017-07-13 20:37 ` [PATCH 05/12] ASoC: max98926: " Gustavo A. R. Silva
@ 2017-07-13 20:38 ` Gustavo A. R. Silva
  2017-07-13 20:38 ` [PATCH 08/12] ASoC: max9867: " Gustavo A. R. Silva
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:38 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/msm8916-wcd-digital.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c
index f690442..7e3794f 100644
--- a/sound/soc/codecs/msm8916-wcd-digital.c
+++ b/sound/soc/codecs/msm8916-wcd-digital.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 08/12] ASoC: max9867: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (5 preceding siblings ...)
  2017-07-13 20:38 ` [PATCH 07/12] ASoC: codecs: msm8916-wcd-digital: " Gustavo A. R. Silva
@ 2017-07-13 20:38 ` Gustavo A. R. Silva
  2017-07-13 20:38 ` [PATCH 09/12] ASoC: rk3036: " Gustavo A. R. Silva
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:38 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/max9867.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index 2a40a69..3e421e9 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 09/12] ASoC: rk3036: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (6 preceding siblings ...)
  2017-07-13 20:38 ` [PATCH 08/12] ASoC: max9867: " Gustavo A. R. Silva
@ 2017-07-13 20:38 ` Gustavo A. R. Silva
  2017-07-13 20:38 ` [PATCH 10/12] ASoC: hdac_hdmi: " Gustavo A. R. Silva
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:38 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/inno_rk3036.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c
index b918ba5..edf42d2 100644
--- a/sound/soc/codecs/inno_rk3036.c
+++ b/sound/soc/codecs/inno_rk3036.c
@@ -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,
 };
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 10/12] ASoC: hdac_hdmi: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (7 preceding siblings ...)
  2017-07-13 20:38 ` [PATCH 09/12] ASoC: rk3036: " Gustavo A. R. Silva
@ 2017-07-13 20:38 ` Gustavo A. R. Silva
  2017-07-13 20:38 ` [PATCH 11/12] ASoC: dwc: " Gustavo A. R. Silva
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:38 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/hdac_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index bc2e74f..e6de50a 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 11/12] ASoC: dwc: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (8 preceding siblings ...)
  2017-07-13 20:38 ` [PATCH 10/12] ASoC: hdac_hdmi: " Gustavo A. R. Silva
@ 2017-07-13 20:38 ` Gustavo A. R. Silva
  2017-07-13 20:38 ` [PATCH 12/12] ASoC: tas5720: " Gustavo A. R. Silva
  2017-07-13 20:42 ` [PATCH 06/12] ASoC: rt5514: " Gustavo A. R. Silva
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:38 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/dwc/dwc-i2s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index 9160676..eebe9d3 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 12/12] ASoC: tas5720: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (9 preceding siblings ...)
  2017-07-13 20:38 ` [PATCH 11/12] ASoC: dwc: " Gustavo A. R. Silva
@ 2017-07-13 20:38 ` Gustavo A. R. Silva
  2017-07-13 20:42 ` [PATCH 06/12] ASoC: rt5514: " Gustavo A. R. Silva
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:38 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/tas5720.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c
index c65b917..01e9ed2 100644
--- a/sound/soc/codecs/tas5720.c
+++ b/sound/soc/codecs/tas5720.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 06/12] ASoC: rt5514: constify snd_soc_dai_ops structure
  2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
                   ` (10 preceding siblings ...)
  2017-07-13 20:38 ` [PATCH 12/12] ASoC: tas5720: " Gustavo A. R. Silva
@ 2017-07-13 20:42 ` Gustavo A. R. Silva
  11 siblings, 0 replies; 13+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-13 20:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: Gustavo A. R. Silva

This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Also, make rt5514_aif_dai_ops static, as it is not used outside this
module.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/soc/codecs/rt5514.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c
index a71e630..4ca73bf 100644
--- a/sound/soc/codecs/rt5514.c
+++ b/sound/soc/codecs/rt5514.c
@@ -1006,7 +1006,7 @@ static int rt5514_i2c_write(void *context, unsigned int reg, unsigned int val)
 #define RT5514_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
 			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
 
-struct snd_soc_dai_ops rt5514_aif_dai_ops = {
+static const struct snd_soc_dai_ops rt5514_aif_dai_ops = {
 	.hw_params = rt5514_hw_params,
 	.set_fmt = rt5514_set_dai_fmt,
 	.set_sysclk = rt5514_set_dai_sysclk,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-07-13 21:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-13 20:37 [PATCH 00/12] constify snd_soc_dai_ops structures Gustavo A. R. Silva
2017-07-13 20:37 ` [PATCH 01/12] ASoC: cs42l42: constify snd_soc_dai_ops structure Gustavo A. R. Silva
2017-07-13 20:37 ` [PATCH 02/12] ASoC: rt5663: " Gustavo A. R. Silva
2017-07-13 20:37 ` [PATCH 03/12] ASoC: rt5616: " Gustavo A. R. Silva
2017-07-13 20:37 ` [PATCH 04/12] ASoC: msm8916-wcd-analog: " Gustavo A. R. Silva
2017-07-13 20:37 ` [PATCH 05/12] ASoC: max98926: " Gustavo A. R. Silva
2017-07-13 20:38 ` [PATCH 07/12] ASoC: codecs: msm8916-wcd-digital: " Gustavo A. R. Silva
2017-07-13 20:38 ` [PATCH 08/12] ASoC: max9867: " Gustavo A. R. Silva
2017-07-13 20:38 ` [PATCH 09/12] ASoC: rk3036: " Gustavo A. R. Silva
2017-07-13 20:38 ` [PATCH 10/12] ASoC: hdac_hdmi: " Gustavo A. R. Silva
2017-07-13 20:38 ` [PATCH 11/12] ASoC: dwc: " Gustavo A. R. Silva
2017-07-13 20:38 ` [PATCH 12/12] ASoC: tas5720: " Gustavo A. R. Silva
2017-07-13 20:42 ` [PATCH 06/12] ASoC: rt5514: " Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox