Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream/test const #4993

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/sound/soc-topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static inline const void *snd_soc_tplg_get_data(struct snd_soc_tplg_hdr *hdr)

/* Dynamic Object loading and removal for component drivers */
int snd_soc_tplg_component_load(struct snd_soc_component *comp,
struct snd_soc_tplg_ops *ops, const struct firmware *fw);
const struct snd_soc_tplg_ops *ops, const struct firmware *fw);
int snd_soc_tplg_component_remove(struct snd_soc_component *comp);

/* Binds event handlers to dynamic widgets */
Expand Down
1 change: 1 addition & 0 deletions scripts/const_structs.checkpatch
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ snd_rawmidi_ops
snd_soc_component_driver
snd_soc_dai_ops
snd_soc_ops
snd_soc_tplg_ops
soc_pcmcia_socket_ops
stacktrace_ops
sysfs_ops
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/avs/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ avs_control_load(struct snd_soc_component *comp, int index, struct snd_kcontrol_
return 0;
}

static struct snd_soc_tplg_ops avs_tplg_ops = {
static const struct snd_soc_tplg_ops avs_tplg_ops = {
.io_ops = avs_control_ops,
.io_ops_count = ARRAY_SIZE(avs_control_ops),
.control_load = avs_control_load,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bdw-rt5650.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static int bdw_rt5650_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops bdw_rt5650_ops = {
static const struct snd_soc_ops bdw_rt5650_ops = {
.hw_params = bdw_rt5650_hw_params,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/ehl_rt5660.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static int rt5660_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops rt5660_ops = {
static const struct snd_soc_ops rt5660_ops = {
.hw_params = rt5660_hw_params,
};

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/intel/boards/kbl_da7219_max98357a.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
}

static struct snd_soc_ops kabylake_dmic_ops = {
static const struct snd_soc_ops kabylake_dmic_ops = {
.startup = kabylake_dmic_startup,
};

Expand Down Expand Up @@ -388,7 +388,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
&constraints_16000);
}

static struct snd_soc_ops skylake_refcap_ops = {
static const struct snd_soc_ops skylake_refcap_ops = {
.startup = kabylake_refcap_startup,
};

Expand Down
6 changes: 3 additions & 3 deletions sound/soc/intel/boards/kbl_da7219_max98927.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ static int kabylake_ssp0_trigger(struct snd_pcm_substream *substream, int cmd)
return 0;
}

static struct snd_soc_ops kabylake_ssp0_ops = {
static const struct snd_soc_ops kabylake_ssp0_ops = {
.hw_params = kabylake_ssp0_hw_params,
.trigger = kabylake_ssp0_trigger,
};
Expand Down Expand Up @@ -535,7 +535,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
}

static struct snd_soc_ops kabylake_dmic_ops = {
static const struct snd_soc_ops kabylake_dmic_ops = {
.startup = kabylake_dmic_startup,
};

Expand Down Expand Up @@ -569,7 +569,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
}


static struct snd_soc_ops skylake_refcap_ops = {
static const struct snd_soc_ops skylake_refcap_ops = {
.startup = kabylake_refcap_startup,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/kbl_rt5660.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static int kabylake_rt5660_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops kabylake_rt5660_ops = {
static const struct snd_soc_ops kabylake_rt5660_ops = {
.hw_params = kabylake_rt5660_hw_params,
};

Expand Down
8 changes: 4 additions & 4 deletions sound/soc/intel/boards/kbl_rt5663_max98927.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops kabylake_rt5663_ops = {
static const struct snd_soc_ops kabylake_rt5663_ops = {
.hw_params = kabylake_rt5663_hw_params,
};

Expand Down Expand Up @@ -539,7 +539,7 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops kabylake_ssp0_ops = {
static const struct snd_soc_ops kabylake_ssp0_ops = {
.hw_params = kabylake_ssp0_hw_params,
};

Expand Down Expand Up @@ -575,7 +575,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
}

static struct snd_soc_ops kabylake_dmic_ops = {
static const struct snd_soc_ops kabylake_dmic_ops = {
.startup = kabylake_dmic_startup,
};

Expand Down Expand Up @@ -609,7 +609,7 @@ static int kabylake_refcap_startup(struct snd_pcm_substream *substream)
&constraints_16000);
}

static struct snd_soc_ops skylake_refcap_ops = {
static const struct snd_soc_ops skylake_refcap_ops = {
.startup = kabylake_refcap_startup,
};

Expand Down
6 changes: 3 additions & 3 deletions sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops kabylake_rt5663_ops = {
static const struct snd_soc_ops kabylake_rt5663_ops = {
.hw_params = kabylake_rt5663_hw_params,
};

Expand Down Expand Up @@ -469,7 +469,7 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops kabylake_ssp0_ops = {
static const struct snd_soc_ops kabylake_ssp0_ops = {
.hw_params = kabylake_ssp0_hw_params,
};

Expand Down Expand Up @@ -508,7 +508,7 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
}

static struct snd_soc_ops kabylake_dmic_ops = {
static const struct snd_soc_ops kabylake_dmic_ops = {
.startup = kabylake_dmic_startup,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_es8336.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static int sof_es8336_hw_params(struct snd_pcm_substream *substream,
}

/* machine stream operations */
static struct snd_soc_ops sof_es8336_ops = {
static const struct snd_soc_ops sof_es8336_ops = {
.hw_params = sof_es8336_hw_params,
.trigger = sof_8336_trigger,
};
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_nau8825.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static int sof_nau8825_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops sof_nau8825_ops = {
static const struct snd_soc_ops sof_nau8825_ops = {
.hw_params = sof_nau8825_hw_params,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_realtek_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops rt1015_ops = {
static const struct snd_soc_ops rt1015_ops = {
.hw_params = rt1015_hw_params,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static int sof_rt5682_hw_params(struct snd_pcm_substream *substream,
return ret;
}

static struct snd_soc_ops sof_rt5682_ops = {
static const struct snd_soc_ops sof_rt5682_ops = {
.hw_params = sof_rt5682_hw_params,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_sdw_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ int sof_sdw_rt_sdca_jack_init(struct snd_soc_card *card,
int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);

/* RT1308 I2S support */
extern struct snd_soc_ops sof_sdw_rt1308_i2s_ops;
extern const struct snd_soc_ops sof_sdw_rt1308_i2s_ops;

/* generic amp support */
int sof_sdw_rt_amp_init(struct snd_soc_card *card,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_sdw_rt_amp.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream,
}

/* machine stream operations */
struct snd_soc_ops sof_sdw_rt1308_i2s_ops = {
const struct snd_soc_ops sof_sdw_rt1308_i2s_ops = {
.hw_params = rt1308_i2s_hw_params,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_wm8804.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static int sof_wm8804_hw_params(struct snd_pcm_substream *substream,
}

/* machine stream operations */
static struct snd_soc_ops sof_wm8804_ops = {
static const struct snd_soc_ops sof_wm8804_ops = {
.hw_params = sof_wm8804_hw_params,
};

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/skylake/skl-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -3470,7 +3470,7 @@ static int skl_tplg_complete(struct snd_soc_component *component)
return 0;
}

static struct snd_soc_tplg_ops skl_tplg_ops = {
static const struct snd_soc_tplg_ops skl_tplg_ops = {
.widget_load = skl_tplg_widget_load,
.control_load = skl_tplg_control_load,
.bytes_ext_ops = skl_tlv_ops,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/qcom/qdsp6/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ static const struct snd_soc_tplg_kcontrol_ops audioreach_io_ops[] = {
audioreach_put_vol_ctrl_audio_mixer, snd_soc_info_volsw},
};

static struct snd_soc_tplg_ops audioreach_tplg_ops = {
static const struct snd_soc_tplg_ops audioreach_tplg_ops = {
.io_ops = audioreach_io_ops,
.io_ops_count = ARRAY_SIZE(audioreach_io_ops),

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/soc-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct soc_tplg {
int bytes_ext_ops_count;

/* optional fw loading callbacks to component drivers */
struct snd_soc_tplg_ops *ops;
const struct snd_soc_tplg_ops *ops;
};

/* check we dont overflow the data for this control chunk */
Expand Down Expand Up @@ -2334,7 +2334,7 @@ static int soc_tplg_load(struct soc_tplg *tplg)

/* load audio component topology from "firmware" file */
int snd_soc_tplg_component_load(struct snd_soc_component *comp,
struct snd_soc_tplg_ops *ops, const struct firmware *fw)
const struct snd_soc_tplg_ops *ops, const struct firmware *fw)
{
struct soc_tplg tplg;
int ret;
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ static const struct snd_soc_tplg_bytes_ext_ops sof_bytes_ext_ops[] = {
{SOF_TPLG_KCTL_BYTES_VOLATILE_RO, snd_sof_bytes_ext_volatile_get},
};

static struct snd_soc_tplg_ops sof_tplg_ops = {
static const struct snd_soc_tplg_ops sof_tplg_ops = {
/* external kcontrol init - used for any driver specific init */
.control_load = sof_control_load,
.control_unload = sof_control_unload,
Expand Down Expand Up @@ -2433,7 +2433,7 @@ static int sof_dspless_link_load(struct snd_soc_component *scomp, int index,
return 0;
}

static struct snd_soc_tplg_ops sof_dspless_tplg_ops = {
static const struct snd_soc_tplg_ops sof_dspless_tplg_ops = {
/* external widget init - used for any driver specific init */
.widget_ready = sof_dspless_widget_ready,
.widget_unload = sof_dspless_widget_unload,
Expand Down
Loading