summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/firewire/bebob/bebob.c9
-rw-r--r--sound/firewire/dice/dice.c9
-rw-r--r--sound/firewire/digi00x/digi00x.c9
-rw-r--r--sound/firewire/fireface/ff.c9
-rw-r--r--sound/firewire/fireworks/fireworks.c9
-rw-r--r--sound/firewire/isight.c5
-rw-r--r--sound/firewire/motu/motu.c9
-rw-r--r--sound/firewire/oxfw/oxfw.c9
-rw-r--r--sound/firewire/tascam/tascam.c9
9 files changed, 27 insertions, 50 deletions
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c
index 3a5579cb3aa8..34ed8afbb30c 100644
--- a/sound/firewire/bebob/bebob.c
+++ b/sound/firewire/bebob/bebob.c
@@ -129,9 +129,6 @@ end:
129static void bebob_free(struct snd_bebob *bebob) 129static void bebob_free(struct snd_bebob *bebob)
130{ 130{
131 snd_bebob_stream_destroy_duplex(bebob); 131 snd_bebob_stream_destroy_duplex(bebob);
132
133 mutex_destroy(&bebob->mutex);
134 fw_unit_put(bebob->unit);
135} 132}
136 133
137/* 134/*
@@ -376,10 +373,10 @@ static void bebob_remove(struct fw_unit *unit)
376 if (bebob->registered) { 373 if (bebob->registered) {
377 // Block till all of ALSA character devices are released. 374 // Block till all of ALSA character devices are released.
378 snd_card_free(bebob->card); 375 snd_card_free(bebob->card);
379 } else {
380 /* Don't forget this case. */
381 bebob_free(bebob);
382 } 376 }
377
378 mutex_destroy(&bebob->mutex);
379 fw_unit_put(bebob->unit);
383} 380}
384 381
385static const struct snd_bebob_rate_spec normal_rate_spec = { 382static const struct snd_bebob_rate_spec normal_rate_spec = {
diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c
index 9bf77adb3127..c6b63e3f36a8 100644
--- a/sound/firewire/dice/dice.c
+++ b/sound/firewire/dice/dice.c
@@ -126,9 +126,6 @@ static void dice_free(struct snd_dice *dice)
126{ 126{
127 snd_dice_stream_destroy_duplex(dice); 127 snd_dice_stream_destroy_duplex(dice);
128 snd_dice_transaction_destroy(dice); 128 snd_dice_transaction_destroy(dice);
129
130 mutex_destroy(&dice->mutex);
131 fw_unit_put(dice->unit);
132} 129}
133 130
134/* 131/*
@@ -261,10 +258,10 @@ static void dice_remove(struct fw_unit *unit)
261 if (dice->registered) { 258 if (dice->registered) {
262 /* No need to wait for releasing card object in this context. */ 259 /* No need to wait for releasing card object in this context. */
263 snd_card_free_when_closed(dice->card); 260 snd_card_free_when_closed(dice->card);
264 } else {
265 /* Don't forget this case. */
266 dice_free(dice);
267 } 261 }
262
263 mutex_destroy(&dice->mutex);
264 fw_unit_put(dice->unit);
268} 265}
269 266
270static void dice_bus_reset(struct fw_unit *unit) 267static void dice_bus_reset(struct fw_unit *unit)
diff --git a/sound/firewire/digi00x/digi00x.c b/sound/firewire/digi00x/digi00x.c
index 554d7ff737a2..7a24348968b9 100644
--- a/sound/firewire/digi00x/digi00x.c
+++ b/sound/firewire/digi00x/digi00x.c
@@ -45,9 +45,6 @@ static void dg00x_free(struct snd_dg00x *dg00x)
45{ 45{
46 snd_dg00x_stream_destroy_duplex(dg00x); 46 snd_dg00x_stream_destroy_duplex(dg00x);
47 snd_dg00x_transaction_unregister(dg00x); 47 snd_dg00x_transaction_unregister(dg00x);
48
49 mutex_destroy(&dg00x->mutex);
50 fw_unit_put(dg00x->unit);
51} 48}
52 49
53static void dg00x_card_free(struct snd_card *card) 50static void dg00x_card_free(struct snd_card *card)
@@ -174,10 +171,10 @@ static void snd_dg00x_remove(struct fw_unit *unit)
174 if (dg00x->registered) { 171 if (dg00x->registered) {
175 // Block till all of ALSA character devices are released. 172 // Block till all of ALSA character devices are released.
176 snd_card_free(dg00x->card); 173 snd_card_free(dg00x->card);
177 } else {
178 /* Don't forget this case. */
179 dg00x_free(dg00x);
180 } 174 }
175
176 mutex_destroy(&dg00x->mutex);
177 fw_unit_put(dg00x->unit);
181} 178}
182 179
183static const struct ieee1394_device_id snd_dg00x_id_table[] = { 180static const struct ieee1394_device_id snd_dg00x_id_table[] = {
diff --git a/sound/firewire/fireface/ff.c b/sound/firewire/fireface/ff.c
index 73425dfe63bf..37866beeb160 100644
--- a/sound/firewire/fireface/ff.c
+++ b/sound/firewire/fireface/ff.c
@@ -31,9 +31,6 @@ static void ff_free(struct snd_ff *ff)
31{ 31{
32 snd_ff_stream_destroy_duplex(ff); 32 snd_ff_stream_destroy_duplex(ff);
33 snd_ff_transaction_unregister(ff); 33 snd_ff_transaction_unregister(ff);
34
35 mutex_destroy(&ff->mutex);
36 fw_unit_put(ff->unit);
37} 34}
38 35
39static void ff_card_free(struct snd_card *card) 36static void ff_card_free(struct snd_card *card)
@@ -147,10 +144,10 @@ static void snd_ff_remove(struct fw_unit *unit)
147 if (ff->registered) { 144 if (ff->registered) {
148 // Block till all of ALSA character devices are released. 145 // Block till all of ALSA character devices are released.
149 snd_card_free(ff->card); 146 snd_card_free(ff->card);
150 } else {
151 /* Don't forget this case. */
152 ff_free(ff);
153 } 147 }
148
149 mutex_destroy(&ff->mutex);
150 fw_unit_put(ff->unit);
154} 151}
155 152
156static const struct snd_ff_spec spec_ff400 = { 153static const struct snd_ff_spec spec_ff400 = {
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c
index 5a17ead86e61..5854d2a87a18 100644
--- a/sound/firewire/fireworks/fireworks.c
+++ b/sound/firewire/fireworks/fireworks.c
@@ -188,9 +188,6 @@ static void efw_free(struct snd_efw *efw)
188{ 188{
189 snd_efw_stream_destroy_duplex(efw); 189 snd_efw_stream_destroy_duplex(efw);
190 snd_efw_transaction_remove_instance(efw); 190 snd_efw_transaction_remove_instance(efw);
191
192 mutex_destroy(&efw->mutex);
193 fw_unit_put(efw->unit);
194} 191}
195 192
196/* 193/*
@@ -360,10 +357,10 @@ static void efw_remove(struct fw_unit *unit)
360 if (efw->registered) { 357 if (efw->registered) {
361 // Block till all of ALSA character devices are released. 358 // Block till all of ALSA character devices are released.
362 snd_card_free(efw->card); 359 snd_card_free(efw->card);
363 } else {
364 /* Don't forget this case. */
365 efw_free(efw);
366 } 360 }
361
362 mutex_destroy(&efw->mutex);
363 fw_unit_put(efw->unit);
367} 364}
368 365
369static const struct ieee1394_device_id efw_id_table[] = { 366static const struct ieee1394_device_id efw_id_table[] = {
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c
index 1f591c8805ea..de4decfb74d5 100644
--- a/sound/firewire/isight.c
+++ b/sound/firewire/isight.c
@@ -602,8 +602,6 @@ static void isight_card_free(struct snd_card *card)
602 struct isight *isight = card->private_data; 602 struct isight *isight = card->private_data;
603 603
604 fw_iso_resources_destroy(&isight->resources); 604 fw_iso_resources_destroy(&isight->resources);
605 fw_unit_put(isight->unit);
606 mutex_destroy(&isight->mutex);
607} 605}
608 606
609static u64 get_unit_base(struct fw_unit *unit) 607static u64 get_unit_base(struct fw_unit *unit)
@@ -705,6 +703,9 @@ static void isight_remove(struct fw_unit *unit)
705 703
706 // Block till all of ALSA character devices are released. 704 // Block till all of ALSA character devices are released.
707 snd_card_free(isight->card); 705 snd_card_free(isight->card);
706
707 mutex_destroy(&isight->mutex);
708 fw_unit_put(isight->unit);
708} 709}
709 710
710static const struct ieee1394_device_id isight_id_table[] = { 711static const struct ieee1394_device_id isight_id_table[] = {
diff --git a/sound/firewire/motu/motu.c b/sound/firewire/motu/motu.c
index 12680c85b37f..281028ee3273 100644
--- a/sound/firewire/motu/motu.c
+++ b/sound/firewire/motu/motu.c
@@ -57,9 +57,6 @@ static void motu_free(struct snd_motu *motu)
57 snd_motu_transaction_unregister(motu); 57 snd_motu_transaction_unregister(motu);
58 58
59 snd_motu_stream_destroy_duplex(motu); 59 snd_motu_stream_destroy_duplex(motu);
60
61 mutex_destroy(&motu->mutex);
62 fw_unit_put(motu->unit);
63} 60}
64 61
65/* 62/*
@@ -174,10 +171,10 @@ static void motu_remove(struct fw_unit *unit)
174 if (motu->registered) { 171 if (motu->registered) {
175 // Block till all of ALSA character devices are released. 172 // Block till all of ALSA character devices are released.
176 snd_card_free(motu->card); 173 snd_card_free(motu->card);
177 } else {
178 /* Don't forget this case. */
179 motu_free(motu);
180 } 174 }
175
176 mutex_destroy(&motu->mutex);
177 fw_unit_put(motu->unit);
181} 178}
182 179
183static void motu_bus_update(struct fw_unit *unit) 180static void motu_bus_update(struct fw_unit *unit)
diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
index 36f905b371e6..14fe02a9ed5d 100644
--- a/sound/firewire/oxfw/oxfw.c
+++ b/sound/firewire/oxfw/oxfw.c
@@ -118,9 +118,6 @@ static void oxfw_free(struct snd_oxfw *oxfw)
118 snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); 118 snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream);
119 if (oxfw->has_output) 119 if (oxfw->has_output)
120 snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); 120 snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream);
121
122 mutex_destroy(&oxfw->mutex);
123 fw_unit_put(oxfw->unit);
124} 121}
125 122
126/* 123/*
@@ -329,10 +326,10 @@ static void oxfw_remove(struct fw_unit *unit)
329 if (oxfw->registered) { 326 if (oxfw->registered) {
330 // Block till all of ALSA character devices are released. 327 // Block till all of ALSA character devices are released.
331 snd_card_free(oxfw->card); 328 snd_card_free(oxfw->card);
332 } else {
333 /* Don't forget this case. */
334 oxfw_free(oxfw);
335 } 329 }
330
331 mutex_destroy(&oxfw->mutex);
332 fw_unit_put(oxfw->unit);
336} 333}
337 334
338static const struct compat_info griffin_firewave = { 335static const struct compat_info griffin_firewave = {
diff --git a/sound/firewire/tascam/tascam.c b/sound/firewire/tascam/tascam.c
index 6f7aaa8c84aa..f4f959128341 100644
--- a/sound/firewire/tascam/tascam.c
+++ b/sound/firewire/tascam/tascam.c
@@ -89,9 +89,6 @@ static void tscm_free(struct snd_tscm *tscm)
89{ 89{
90 snd_tscm_transaction_unregister(tscm); 90 snd_tscm_transaction_unregister(tscm);
91 snd_tscm_stream_destroy_duplex(tscm); 91 snd_tscm_stream_destroy_duplex(tscm);
92
93 mutex_destroy(&tscm->mutex);
94 fw_unit_put(tscm->unit);
95} 92}
96 93
97static void tscm_card_free(struct snd_card *card) 94static void tscm_card_free(struct snd_card *card)
@@ -214,10 +211,10 @@ static void snd_tscm_remove(struct fw_unit *unit)
214 if (tscm->registered) { 211 if (tscm->registered) {
215 // Block till all of ALSA character devices are released. 212 // Block till all of ALSA character devices are released.
216 snd_card_free(tscm->card); 213 snd_card_free(tscm->card);
217 } else {
218 /* Don't forget this case. */
219 tscm_free(tscm);
220 } 214 }
215
216 mutex_destroy(&tscm->mutex);
217 fw_unit_put(tscm->unit);
221} 218}
222 219
223static const struct ieee1394_device_id snd_tscm_id_table[] = { 220static const struct ieee1394_device_id snd_tscm_id_table[] = {