diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2018-10-10 15:34:59 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-10-10 12:11:34 +0200 |
commit | 61ccc6f6b27c03bb32ca38a3c580d49ce1612d43 (patch) | |
tree | 7db489b32d390c7627693eec90e3488d7c3a21ec /sound/firewire/isight.c | |
parent | d06fb562bff5d14defdacbd92449bacbaedd5cdf (diff) | |
download | linux-61ccc6f6b27c03bb32ca38a3c580d49ce1612d43.tar.gz linux-61ccc6f6b27c03bb32ca38a3c580d49ce1612d43.tar.bz2 linux-61ccc6f6b27c03bb32ca38a3c580d49ce1612d43.zip |
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>
Diffstat (limited to 'sound/firewire/isight.c')
-rw-r--r-- | sound/firewire/isight.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index 30957477e005..1f591c8805ea 100644 --- a/sound/firewire/isight.c +++ b/sound/firewire/isight.c @@ -703,7 +703,8 @@ static void isight_remove(struct fw_unit *unit) isight_stop_streaming(isight); mutex_unlock(&isight->mutex); - snd_card_free_when_closed(isight->card); + // Block till all of ALSA character devices are released. + snd_card_free(isight->card); } static const struct ieee1394_device_id isight_id_table[] = { |