Re: [PATCH v4 06/22] ASoC: ops: Introduce 'soc_set_enum_kctl'
From: Mark Brown
Date: Mon Nov 09 2026 - 16:00:56 EST
> The new function is to be used to set enumerated controls to desired
> values. It is something a machine driver may call in fixup_controls.
The subject has soc_set_enum_kctl() but the code has
snd_soc_set_enum_kctl().
> +/**
> + * snd_soc_set_enum_kctl - Set enumerated control matching a name
> + *
> + * @card: where to look for the controls
> + * @name: name
> + * @value: string value to set the controls to
> + *
> + * Return 0 on success, else error.
> + */
> + for (i = 0; i < info->count; i++)
> + evalue->value.enumerated.item[i] = sel;
> +
> + return kctl->put(kctl, evalue);
> +}
put() returns 1 on change which is not what the kerneldoc says, the code
is the better choice here.
--
Mark Brown <broonie@xxxxxxxxxx>