ALSA: firewire: release reference count of firewire unit in .remove callback of bus driver

In a previous commit, drivers in ALSA firewire stack blocks .remove
callback of bus driver. This enables to release members of private
data in the callback after releasing device of sound card.

This commit simplifies codes to release the members.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Sakamoto
2018-10-10 15:35:00 +09:00
committed by Takashi Iwai
父節點 61ccc6f6b2
當前提交 5b14ec25a7
共有 9 個文件被更改,包括 27 次插入50 次删除

查看文件

@@ -188,9 +188,6 @@ static void efw_free(struct snd_efw *efw)
{
snd_efw_stream_destroy_duplex(efw);
snd_efw_transaction_remove_instance(efw);
mutex_destroy(&efw->mutex);
fw_unit_put(efw->unit);
}
/*
@@ -360,10 +357,10 @@ static void efw_remove(struct fw_unit *unit)
if (efw->registered) {
// Block till all of ALSA character devices are released.
snd_card_free(efw->card);
} else {
/* Don't forget this case. */
efw_free(efw);
}
mutex_destroy(&efw->mutex);
fw_unit_put(efw->unit);
}
static const struct ieee1394_device_id efw_id_table[] = {