From: Charles Keepax Date: Fri, 12 May 2023 12:28:31 +0000 (+0100) Subject: ASoC: ak4118: Update to use new component control notify helper X-Git-Tag: v6.6.17~3959^2~32^2~163^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=476d942e50d4f22d8621a18612dd6cfbf0a5d1d9;p=platform%2Fkernel%2Flinux-rpi.git ASoC: ak4118: Update to use new component control notify helper Update the driver to use the new ASoC core control notify helper. This also fixes a bug where the control would not be found if the CODEC was given a name prefix. Signed-off-by: Charles Keepax component; struct snd_kcontrol_new *kctl_new; - struct snd_kcontrol *kctl; - struct snd_ctl_elem_id *id; unsigned int i; if (!component) @@ -273,13 +271,8 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data) for (i = 0; i < ARRAY_SIZE(ak4118_iec958_controls); i++) { kctl_new = &ak4118_iec958_controls[i]; - kctl = snd_soc_card_get_kcontrol(component->card, - kctl_new->name); - if (!kctl) - continue; - id = &kctl->id; - snd_ctl_notify(component->card->snd_card, - SNDRV_CTL_EVENT_MASK_VALUE, id); + + snd_soc_component_notify_control(component, kctl_new->name); } return IRQ_HANDLED;