LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
To: johannes@sipsolutions.net, perex@perex.cz, tiwai@suse.de
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Subject: [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup
Date: Mon, 30 Nov 2026 13:02:32 +0000	[thread overview]
Message-ID: <20261130130232.2813-1-sreekuttan2156239@gmail.com> (raw)

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



             reply	other threads:[~2026-11-30 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 13:02 Sreeraj S Kurup [this message]
2026-11-30 13:13 ` [PATCH v2] ALSA: aoa: Fix GPIO notification IRQ cleanup Sreeraj S Kurup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130130232.2813-1-sreekuttan2156239@gmail.com \
    --to=sreekuttan2156239@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox