Skip to content

Commit

Permalink
ASoC: rt5640: Fix IRQ not being free-ed for HDA jack detect mode
Browse files Browse the repository at this point in the history
[ Upstream commit 8c8bf3d ]

Set "rt5640->irq_requested = true" after a successful request_irq()
in rt5640_enable_hda_jack_detect(), so that rt5640_disable_jack_detect()
properly frees the IRQ.

This fixes the IRQ not being freed on rmmod / driver unbind.

Fixes: 2b9c8d2 ("ASoC: rt5640: Add the HDA header support")
Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230912113245.320159-6-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jwrdegoede authored and gregkh committed Oct 6, 2023
1 parent 293e492 commit 1698854
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/codecs/rt5640.c
Original file line number Diff line number Diff line change
Expand Up @@ -2624,6 +2624,7 @@ static void rt5640_enable_hda_jack_detect(
rt5640->irq = -ENXIO;
return;
}
rt5640->irq_requested = true;

/* sync initial jack state */
queue_delayed_work(system_long_wq, &rt5640->jack_work, 0);
Expand Down

0 comments on commit 1698854

Please sign in to comment.