mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup
@ 2026-11-30 13:02 Sreeraj S Kurup
  2026-11-30 13:13 ` [PATCH v2] " Sreeraj S Kurup
  0 siblings, 1 reply; 4+ messages in thread
From: Sreeraj S Kurup @ 2026-11-30 13:02 UTC (permalink / raw)
  To: johannes, perex, tiwai
  Cc: linux-kernel, linux-sound, linuxppc-dev, Sreeraj S Kurup

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.

Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
 sound/aoa/core/gpio-feature.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/aoa/core/gpio-feature.c b/sound/aoa/core/gpio-feature.c
index 19ed0e6907da..2549b660caa4 100644
--- a/sound/aoa/core/gpio-feature.c
+++ b/sound/aoa/core/gpio-feature.c
@@ -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);
-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ALSA: aoa: Fix GPIO notification IRQ cleanup
  2026-11-30 13:02 [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup Sreeraj S Kurup
@ 2026-11-30 13:13 ` Sreeraj S Kurup
  2026-12-01  7:47   ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Sreeraj S Kurup @ 2026-11-30 13:13 UTC (permalink / raw)
  To: sreekuttan2156239, johannes, perex, tiwai
  Cc: linux-kernel, linux-sound, linuxppc-dev

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.

Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")
Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
v2:
 - Add Fixes trailer.

 sound/aoa/core/gpio-feature.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/aoa/core/gpio-feature.c b/sound/aoa/core/gpio-feature.c
index 19ed0e6907da..2549b660caa4 100644
--- a/sound/aoa/core/gpio-feature.c
+++ b/sound/aoa/core/gpio-feature.c
@@ -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);
-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ALSA: aoa: Fix GPIO notification IRQ cleanup
  2026-11-30 13:13 ` [PATCH v2] " Sreeraj S Kurup
@ 2026-12-01  7:47   ` Takashi Iwai
  2026-12-01 12:48     ` Sreeraj S Kurup
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2026-12-01  7:47 UTC (permalink / raw)
  To: Sreeraj S Kurup
  Cc: johannes, perex, tiwai, linux-kernel, linux-sound, linuxppc-dev

On Mon, 30 Nov 2026 14:13:10 +0100,
Sreeraj S Kurup wrote:
> 
> 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.
> 
> Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

Applied to for-next branch.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ALSA: aoa: Fix GPIO notification IRQ cleanup
  2026-12-01  7:47   ` Takashi Iwai
@ 2026-12-01 12:48     ` Sreeraj S Kurup
  0 siblings, 0 replies; 4+ messages in thread
From: Sreeraj S Kurup @ 2026-12-01 12:48 UTC (permalink / raw)
  To: tiwai
  Cc: johannes, linux-kernel, linux-sound, linuxppc-dev, perex,
	sreekuttan2156239

Hi,

Thanks for applying the patch!

Best regards,
Sreeraj

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-01 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 13:02 [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup Sreeraj S Kurup
2026-11-30 13:13 ` [PATCH v2] " Sreeraj S Kurup
2026-12-01  7:47   ` Takashi Iwai
2026-12-01 12:48     ` Sreeraj S Kurup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®