ALSA: firewire: block .remove callback of bus driver till all of ALSA character devices are released
At present, in .remove callback of bus driver just decrease reference count of device for ALSA card instance. This delegates release of the device to a process in which the last of ALSA character device is released. On the other hand, the other drivers such as for devices on PCIe are programmed to block .remove callback of bus driver till all of ALSA character devices are released. For consistency of behaviour for whole drivers, this probably confuses users. This commit takes drivers in ALSA firewire stack to imitate the above behaviour. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committad av
Takashi Iwai

förälder
d06fb562bf
incheckning
61ccc6f6b2
@@ -145,8 +145,8 @@ static void snd_ff_remove(struct fw_unit *unit)
|
||||
cancel_work_sync(&ff->dwork.work);
|
||||
|
||||
if (ff->registered) {
|
||||
/* No need to wait for releasing card object in this context. */
|
||||
snd_card_free_when_closed(ff->card);
|
||||
// Block till all of ALSA character devices are released.
|
||||
snd_card_free(ff->card);
|
||||
} else {
|
||||
/* Don't forget this case. */
|
||||
ff_free(ff);
|
||||
|
Referens i nytt ärende
Block a user