linux-stable/sound
Hans de Goede fa6a0c0c1d
ASoC: rt5640: Revert "Fix sleep in atomic context"
Commit 70a6404ff6 ("ASoC: rt5640: Fix sleep in atomic context")
not only switched from request_irq() to request_threaded_irq(),
to fix the sleep in atomic context issue, but it also added
devm management of the IRQ by actually switching to
devm_request_threaded_irq() (without any explanation in the commit
message for this change).

This is wrong since the IRQ was already explicitly managed by
the driver. On unbind the ASoC core will call rt5640_set_jack(NULL)
which in turn will call rt5640_disable_jack_detect() which
frees the IRQ already. So now we have a double free.

Besides the unexplained switch to devm being wrong, the actual fix
for the sleep in atomic context issue also is not the best solution.

The only thing which rt5640_irq() does is cancel + (re-)queue
the jack_work delayed_work. This can be done in a single non sleeping
call by replacing queue_delayed_work() with mod_delayed_work(),
which does not sleep. Using mod_delayed_work() is a much better fix
then adding a thread which does nothing other then queuing a work-item.

This patch is a straight revert of the troublesome changes, the switch
to mod_delayed_work() is done in a separate follow-up patch.

Fixes: 70a6404ff6 ("ASoC: rt5640: Fix sleep in atomic context")
Cc: Sameer Pujar <spujar@nvidia.com>
Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230912113245.320159-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-12 14:37:46 +01:00
..
ac97 ALSA: ac97: set variables dev_attr_vendor_id to static 2023-08-02 09:27:39 +02:00
aoa ALSA: aoa: Fix typos in PCM fix patch 2023-08-18 09:09:39 +02:00
arm ARM: pxa: fix missing-prototypes warnings 2023-05-26 13:33:05 +02:00
atmel ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
core ALSA: seq: Fix snd_seq_expand_var_event() call to user-space 2023-09-05 10:13:46 +02:00
drivers ASoC: Updates for v6.6 2023-08-28 16:13:03 +02:00
firewire ALSA: dice: add stream format parameters for Weiss devices 2023-08-10 10:10:34 +02:00
hda sound updates for 6.6-rc1 2023-08-30 13:45:05 -07:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-06 08:09:36 +02:00
isa ALSA: sb: Fix wrong argument in commented code 2023-09-02 08:11:55 +02:00
mips
oss
parisc
pci ALSA: hda/realtek - ALC287 I2S speaker platform support 2023-09-07 10:33:04 +02:00
pcmcia ALSA: add HAS_IOPORT dependencies 2023-05-22 16:43:47 +02:00
ppc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
sh ALSA: sh: Convert to generic PCM copy ops 2023-08-18 12:18:24 +02:00
soc ASoC: rt5640: Revert "Fix sleep in atomic context" 2023-09-12 14:37:46 +01:00
sparc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
spi
synth ALSA: emu10k1: fix synthesizer pitch for E-MU cards at 44.1 kHz 2023-06-13 07:42:08 +02:00
usb ALSA: usb-audio: Fix potential memory leaks at error path for UMP open 2023-09-05 10:10:48 +02:00
virtio
x86
xen ALSA: xen: Convert to generic PCM copy ops 2023-08-18 12:18:25 +02:00
ac97_bus.c
Kconfig This pull request contains the following changes for UML: 2023-09-04 11:32:21 -07:00
last.c
Makefile
sound_core.c sound: make all 'class' structures const 2023-06-21 07:29:10 +02:00