|
@@ -184,8 +184,12 @@ efw_card_free(struct snd_card *card)
|
|
{
|
|
{
|
|
struct snd_efw *efw = card->private_data;
|
|
struct snd_efw *efw = card->private_data;
|
|
|
|
|
|
|
|
+ snd_efw_stream_destroy_duplex(efw);
|
|
|
|
+ snd_efw_transaction_remove_instance(efw);
|
|
fw_unit_put(efw->unit);
|
|
fw_unit_put(efw->unit);
|
|
|
|
|
|
|
|
+ kfree(efw->resp_buf);
|
|
|
|
+
|
|
if (efw->card_index >= 0) {
|
|
if (efw->card_index >= 0) {
|
|
mutex_lock(&devices_mutex);
|
|
mutex_lock(&devices_mutex);
|
|
clear_bit(efw->card_index, devices_used);
|
|
clear_bit(efw->card_index, devices_used);
|
|
@@ -193,7 +197,6 @@ efw_card_free(struct snd_card *card)
|
|
}
|
|
}
|
|
|
|
|
|
mutex_destroy(&efw->mutex);
|
|
mutex_destroy(&efw->mutex);
|
|
- kfree(efw->resp_buf);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|
|
@@ -297,11 +300,6 @@ static void efw_remove(struct fw_unit *unit)
|
|
{
|
|
{
|
|
struct snd_efw *efw = dev_get_drvdata(&unit->device);
|
|
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. */
|
|
/* No need to wait for releasing card object in this context. */
|
|
snd_card_free_when_closed(efw->card);
|
|
snd_card_free_when_closed(efw->card);
|
|
}
|
|
}
|