ALSA: aoa: Fix GPIO notification IRQ cleanup
Subsystems (2)
PATCH 1/1 ALSA: aoa: Fix GPIO notification IRQ cleanup
The feature GPIO implementation checks gpio_private when cleaning up the line-in and line-out notification IRQs.
However, ftr_set_notify() registers these IRQs using request_irq() and tracks the registered callbacks through the notify field.
Check notify consistently for all notification IRQs so that registered line-in and line-out IRQs are released during teardown.
--- sound/aoa/core/gpio-feature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/aoa/core/gpio-feature.c +2 -2
@@ -285,9 +285,9 @@ static void ftr_gpio_exit(struct gpio_runtime *rt) rt->implementation_private =0 ;if (rt->headphone_notify.notify)free_irq (headphone_detect_irq, &rt->headphone_notify); -if (rt->line_in_notify.gpio_private) +if (rt->line_in_notify.notify)free_irq (linein_detect_irq, &rt->line_in_notify); -if (rt->line_out_notify.gpio_private) +if (rt->line_out_notify.notify)free_irq (lineout_detect_irq, &rt->line_out_notify);cancel_delayed_work_sync (&rt->headphone_notify.work);cancel_delayed_work_sync (&rt->line_in_notify.work);
Signature · 1 line
2.55.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] ALSA: aoa: missing Fixes trailer for ftr_gpio_exit() IRQ cleanup fix --
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] ALSA: aoa: missing Fixes trailer for ftr_gpio_exit() IRQ cleanup fix
--
commit 9f709f56656cba3f95f376bcac2ddeb15a825400
Author: Sreeraj S Kurup <[email protected]>
Quoted 5 lines
ALSA: aoa: Fix GPIO notification IRQ cleanup
The feature GPIO implementation checks
gpio_privatewhen cleaning up the line-in and line-out notification IRQs.
Quoted 7 lines
However,
ftr_set_notify()registers these IRQs usingrequest_irq()and tracks the registered callbacks through the notify field.Check notify consistently for all notification IRQs so that registered line-in and line-out IRQs are released during teardown.
Signed-off-by Sreeraj S Kurup <[email protected]>
[Severity: Low]
This fixes a bug present since ftr_gpio_exit() was added. Should this include:
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
PATCH v2 1/1 ALSA: aoa: Fix GPIO notification IRQ cleanup
In reply to Sreeraj S KurupThe feature GPIO implementation checks gpio_private when cleaning up the line-in and line-out notification IRQs.
However, ftr_set_notify() registers these IRQs using request_irq() and tracks the registered callbacks through the notify field.
Check notify consistently for all notification IRQs so that registered line-in and line-out IRQs are released during teardown.
---
v2:
- Add Fixes trailer.
sound/aoa/core/gpio-feature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/aoa/core/gpio-feature.c +2 -2
@@ -285,9 +285,9 @@ static void ftr_gpio_exit(struct gpio_runtime *rt) rt->implementation_private =0 ;if (rt->headphone_notify.notify)free_irq (headphone_detect_irq, &rt->headphone_notify); -if (rt->line_in_notify.gpio_private) +if (rt->line_in_notify.notify)free_irq (linein_detect_irq, &rt->line_in_notify); -if (rt->line_out_notify.gpio_private) +if (rt->line_out_notify.notify)free_irq (lineout_detect_irq, &rt->line_out_notify);cancel_delayed_work_sync (&rt->headphone_notify.work);cancel_delayed_work_sync (&rt->line_in_notify.work);
Signature · 1 line
2.55.0
Takashi Iwai
AppliedQuoted 4 lines · Sreeraj S Kurup
The feature GPIO implementation checks
gpio_privatewhen cleaning up the line-in and line-out notification IRQs.
Quoted 8 lines
However,
ftr_set_notify()registers these IRQs usingrequest_irq()and tracks the registered callbacks through the notify field.Check notify consistently for all notification IRQs so that registered line-in and line-out IRQs are released during teardown.
Fixes f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")Signed-off-by Sreeraj S Kurup <[email protected]>
Applied to for-next branch. Thanks.
Takashi
Hi,
Thanks for applying the patch!
Best regards,
Sreeraj