Skip to content

Commit bf95919

Browse files
krzkbroonie
authored andcommitted
ASoC: dapm: Use unsigned for number of widgets in snd_soc_dapm_new_controls()
Number of widgets in array passed to snd_soc_dapm_new_controls() cannot be negative, so make it explicit by using 'unsigned int', just like snd_soc_add_component_controls() is doing. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://patch.msgid.link/20240701-b4-qcom-audio-lpass-codec-cleanups-v3-4-6d98d4dd1ef5@linaro.org Signed-off-by: Mark Brown <[email protected]>
1 parent 0c02cac commit bf95919

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/sound/soc-dapm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,
457457
int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
458458
struct snd_ctl_elem_value *uncontrol);
459459
int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
460-
const struct snd_soc_dapm_widget *widget, int num);
460+
const struct snd_soc_dapm_widget *widget, unsigned int num);
461461
struct snd_soc_dapm_widget *snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
462462
const struct snd_soc_dapm_widget *widget);
463463
struct snd_soc_dapm_widget *snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,

sound/soc/soc-dapm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3857,7 +3857,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_new_control);
38573857
*/
38583858
int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
38593859
const struct snd_soc_dapm_widget *widget,
3860-
int num)
3860+
unsigned int num)
38613861
{
38623862
int i;
38633863
int ret = 0;

0 commit comments

Comments
 (0)