[alsa-devel] [PATCH 6/7] ASoC: mediatek: Constify hw_constraints
Matthias Brugger
matthias.bgg at gmail.com
Fri Jun 9 09:39:07 CEST 2017
On 08/06/17 23:37, Takashi Iwai wrote:
> snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
> const pointers. Constify the corresponding static objects for better
> hardening.
>
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
> ---
> sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/mediatek/mt2701/mt2701-cs42448.c b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
> index aa5b31b121e3..70f61d53fe05 100644
> --- a/sound/soc/mediatek/mt2701/mt2701-cs42448.c
> +++ b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
> @@ -107,7 +107,7 @@ static const struct snd_kcontrol_new mt2701_cs42448_controls[] = {
>
> static const unsigned int mt2701_cs42448_sampling_rates[] = {48000};
>
> -static struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
> +static const struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
> .count = ARRAY_SIZE(mt2701_cs42448_sampling_rates),
> .list = mt2701_cs42448_sampling_rates,
> .mask = 0,
>
Acked-By: Matthias Brugger <matthias.bgg at gmail.com>
More information about the Alsa-devel
mailing list