Unverified Commit 7817317e authored by Mark Brown's avatar Mark Brown
Browse files

Merge series "ASoC: rt*: Constify static structs" from Rikard Falkeborn...

Merge series "ASoC: rt*: Constify static structs" from Rikard Falkeborn <rikard.falkeborn@gmail.com>:

Constify a number of static structs that are never modified in RealTek
codecs. The most important patches are the first two, which constifies
snd_soc_dai_ops and sdw_slave_ops, both which contain function pointers.
The other two patches are for good measure, since I was already touching
the code there.

When doing this, I discovered sound/soc/codecs/rt1016.c is not in a
Makefile, so there is not really any way to build it (I added locally to
the Makefile to compile-test my changes). Is this expected or an oversight?

Rikard Falkeborn (4):
  ASoC: rt*: Constify static struct sdw_slave_ops
  ASoC: rt*: Constify static struct snd_soc_dai_ops
  ASoC: rt*: Constify static struct acpi_device_id
  ASoc: rt5631: Constify static struct coeff_clk_div

 sound/soc/codecs/rt1011.c     | 2 +-
 sound/soc/codecs/rt1015.c     | 4 ++--
 sound/soc/codecs/rt1016.c     | 4 ++--
 sound/soc/codecs/rt1305.c     | 2 +-
 sound/soc/codecs/rt1308-sdw.c | 2 +-
 sound/soc/codecs/rt1308.c     | 2 +-
 sound/soc/codecs/rt5631.c     | 2 +-
 sound/soc/codecs/rt5682-sdw.c | 4 ++--
 sound/soc/codecs/rt700-sdw.c  | 2 +-
 sound/soc/codecs/rt700.c      | 2 +-
 sound/soc/codecs/rt711-sdw.c  | 2 +-
 sound/soc/codecs/rt711.c      | 2 +-
 sound/soc/codecs/rt715-sdw.c  | 2 +-
 sound/soc/codecs/rt715.c      | 2 +-
 14 files changed, 17 insertions(+), 17 deletions(-)

--
2.30.1
parents 893bc891 c4fd082e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2151,7 +2151,7 @@ MODULE_DEVICE_TABLE(of, rt1011_of_match);
#endif

#ifdef CONFIG_ACPI
static struct acpi_device_id rt1011_acpi_match[] = {
static const struct acpi_device_id rt1011_acpi_match[] = {
	{"10EC1011", 0,},
	{},
};
+2 −2
Original line number Diff line number Diff line
@@ -1028,7 +1028,7 @@ static void rt1015_remove(struct snd_soc_component *component)
#define RT1015_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 rt1015_aif_dai_ops = {
static const struct snd_soc_dai_ops rt1015_aif_dai_ops = {
	.hw_params = rt1015_hw_params,
	.set_fmt = rt1015_set_dai_fmt,
	.set_tdm_slot = rt1015_set_tdm_slot,
@@ -1121,7 +1121,7 @@ MODULE_DEVICE_TABLE(of, rt1015_of_match);
#endif

#ifdef CONFIG_ACPI
static struct acpi_device_id rt1015_acpi_match[] = {
static const struct acpi_device_id rt1015_acpi_match[] = {
	{"10EC1015", 0,},
	{},
};
+2 −2
Original line number Diff line number Diff line
@@ -534,7 +534,7 @@ static void rt1016_remove(struct snd_soc_component *component)
#define RT1016_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 rt1016_aif_dai_ops = {
static const struct snd_soc_dai_ops rt1016_aif_dai_ops = {
	.hw_params = rt1016_hw_params,
	.set_fmt = rt1016_set_dai_fmt,
};
@@ -623,7 +623,7 @@ MODULE_DEVICE_TABLE(of, rt1016_of_match);
#endif

#ifdef CONFIG_ACPI
static struct acpi_device_id rt1016_acpi_match[] = {
static const struct acpi_device_id rt1016_acpi_match[] = {
	{"10EC1016", 0,},
	{},
};
+1 −1
Original line number Diff line number Diff line
@@ -975,7 +975,7 @@ MODULE_DEVICE_TABLE(of, rt1305_of_match);
#endif

#ifdef CONFIG_ACPI
static struct acpi_device_id rt1305_acpi_match[] = {
static const struct acpi_device_id rt1305_acpi_match[] = {
	{"10EC1305", 0,},
	{"10EC1306", 0,},
	{},
+1 −1
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@ static int rt1308_sdw_pcm_hw_free(struct snd_pcm_substream *substream,
 * slave_ops: callbacks for get_clock_stop_mode, clock_stop and
 * port_prep are not defined for now
 */
static struct sdw_slave_ops rt1308_slave_ops = {
static const struct sdw_slave_ops rt1308_slave_ops = {
	.read_prop = rt1308_read_prop,
	.interrupt_callback = rt1308_interrupt_callback,
	.update_status = rt1308_update_status,
Loading