summaryrefslogtreecommitdiff
path: root/sound/firewire/dice
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-02-21 23:55:00 +0900
committerTakashi Iwai <tiwai@suse.de>2015-02-23 09:11:24 +0100
commitdec84316dd53c90e93b4ee849483bd4bd1e9a585 (patch)
tree3725938633e83ba9bf303e171323bbb911a0ba9f /sound/firewire/dice
parentd23c2cc4485d10f0cedfef99dd2961d9652b1b3f (diff)
ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely
A part of these drivers, especially BeBoB driver, are programmed to wait some events. Thus the drivers should not destroy any data in .remove() context. This commit moves some destructors from 'struct fw_driver.remove()' to 'struct snd_card.private_free()' to shutdown safely. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> # 3.19+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/dice')
-rw-r--r--sound/firewire/dice/dice.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c
index 797f0726fc74..70a111d7f428 100644
--- a/sound/firewire/dice/dice.c
+++ b/sound/firewire/dice/dice.c
@@ -236,6 +236,7 @@ static void dice_card_free(struct snd_card *card)
{
struct snd_dice *dice = card->private_data;
+ snd_dice_stream_destroy_duplex(dice);
snd_dice_transaction_destroy(dice);
fw_unit_put(dice->unit);
@@ -313,10 +314,6 @@ static void dice_remove(struct fw_unit *unit)
{
struct snd_dice *dice = dev_get_drvdata(&unit->device);
- snd_card_disconnect(dice->card);
-
- snd_dice_stream_destroy_duplex(dice);
-
/* No need to wait for releasing card object in this context. */
snd_card_free_when_closed(dice->card);
}