ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely
[deliverable/linux.git] / sound / firewire / fireworks / fireworks.c
index 1e33394d8a930e9c0c0f86fae2c616ab6af11220..2682e7e3e5c98511e8bd26fddf452427f1e83a6a 100644 (file)
@@ -184,8 +184,12 @@ efw_card_free(struct snd_card *card)
 {
        struct snd_efw *efw = card->private_data;
 
+       snd_efw_stream_destroy_duplex(efw);
+       snd_efw_transaction_remove_instance(efw);
        fw_unit_put(efw->unit);
 
+       kfree(efw->resp_buf);
+
        if (efw->card_index >= 0) {
                mutex_lock(&devices_mutex);
                clear_bit(efw->card_index, devices_used);
@@ -193,7 +197,6 @@ efw_card_free(struct snd_card *card)
        }
 
        mutex_destroy(&efw->mutex);
-       kfree(efw->resp_buf);
 }
 
 static int
@@ -297,11 +300,6 @@ static void efw_remove(struct fw_unit *unit)
 {
        struct snd_efw *efw = dev_get_drvdata(&unit->device);
 
-       snd_efw_stream_destroy_duplex(efw);
-       snd_efw_transaction_remove_instance(efw);
-
-       snd_card_disconnect(efw->card);
-
        /* No need to wait for releasing card object in this context. */
        snd_card_free_when_closed(efw->card);
 }
This page took 0.023899 seconds and 5 git commands to generate.