Commit aedef16a authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: dice: fix to wait for releases of all ALSA character devices

In a development period for Linux kernel v4.20, drivers in ALSA firewire
stack were changed to wait for releases of all ALSA character devices at
.remove callback of bus driver. However, ALSA dice driver is partly out
of this change. This bug can bring fault to user process which holds
the last of character device in unplugging.

This commit fixes the driver to wait in the callback.

Fixes: 61ccc6f6 ('ALSA: firewire: block .remove callback of bus driver till all of ALSA character devices are released')
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent de7d83da
...@@ -240,8 +240,8 @@ static void dice_remove(struct fw_unit *unit) ...@@ -240,8 +240,8 @@ static void dice_remove(struct fw_unit *unit)
cancel_delayed_work_sync(&dice->dwork); cancel_delayed_work_sync(&dice->dwork);
if (dice->registered) { if (dice->registered) {
/* No need to wait for releasing card object in this context. */ // Block till all of ALSA character devices are released.
snd_card_free_when_closed(dice->card); snd_card_free(dice->card);
} }
mutex_destroy(&dice->mutex); mutex_destroy(&dice->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment