diff options
author | David S. Miller <davem@davemloft.net> | 2015-03-03 21:16:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-03 21:16:48 -0500 |
commit | 71a83a6db6138b9d41d8a0b6b91cb59f6dc4742c (patch) | |
tree | f74b6e4e48257ec6ce40b95645ecb8533b9cc1f8 /sound/firewire/dice/dice-stream.c | |
parent | b97526f3ff95f92b107f0fb52cbb8627e395429b (diff) | |
parent | a6c5170d1edea97c538c81e377e56c7b5c5b7e63 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/rocker/rocker.c
The rocker commit was two overlapping changes, one to rename
the ->vport member to ->pport, and another making the bitmask
expression use '1ULL' instead of plain '1'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/firewire/dice/dice-stream.c')
-rw-r--r-- | sound/firewire/dice/dice-stream.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/firewire/dice/dice-stream.c b/sound/firewire/dice/dice-stream.c index fa9cf761b610..07dbd01d7a6b 100644 --- a/sound/firewire/dice/dice-stream.c +++ b/sound/firewire/dice/dice-stream.c | |||
@@ -311,14 +311,21 @@ end: | |||
311 | return err; | 311 | return err; |
312 | } | 312 | } |
313 | 313 | ||
314 | /* | ||
315 | * This function should be called before starting streams or after stopping | ||
316 | * streams. | ||
317 | */ | ||
314 | static void destroy_stream(struct snd_dice *dice, struct amdtp_stream *stream) | 318 | static void destroy_stream(struct snd_dice *dice, struct amdtp_stream *stream) |
315 | { | 319 | { |
316 | amdtp_stream_destroy(stream); | 320 | struct fw_iso_resources *resources; |
317 | 321 | ||
318 | if (stream == &dice->tx_stream) | 322 | if (stream == &dice->tx_stream) |
319 | fw_iso_resources_destroy(&dice->tx_resources); | 323 | resources = &dice->tx_resources; |
320 | else | 324 | else |
321 | fw_iso_resources_destroy(&dice->rx_resources); | 325 | resources = &dice->rx_resources; |
326 | |||
327 | amdtp_stream_destroy(stream); | ||
328 | fw_iso_resources_destroy(resources); | ||
322 | } | 329 | } |
323 | 330 | ||
324 | int snd_dice_stream_init_duplex(struct snd_dice *dice) | 331 | int snd_dice_stream_init_duplex(struct snd_dice *dice) |
@@ -332,6 +339,8 @@ int snd_dice_stream_init_duplex(struct snd_dice *dice) | |||
332 | goto end; | 339 | goto end; |
333 | 340 | ||
334 | err = init_stream(dice, &dice->rx_stream); | 341 | err = init_stream(dice, &dice->rx_stream); |
342 | if (err < 0) | ||
343 | destroy_stream(dice, &dice->tx_stream); | ||
335 | end: | 344 | end: |
336 | return err; | 345 | return err; |
337 | } | 346 | } |
@@ -340,10 +349,7 @@ void snd_dice_stream_destroy_duplex(struct snd_dice *dice) | |||
340 | { | 349 | { |
341 | snd_dice_transaction_clear_enable(dice); | 350 | snd_dice_transaction_clear_enable(dice); |
342 | 351 | ||
343 | stop_stream(dice, &dice->tx_stream); | ||
344 | destroy_stream(dice, &dice->tx_stream); | 352 | destroy_stream(dice, &dice->tx_stream); |
345 | |||
346 | stop_stream(dice, &dice->rx_stream); | ||
347 | destroy_stream(dice, &dice->rx_stream); | 353 | destroy_stream(dice, &dice->rx_stream); |
348 | 354 | ||
349 | dice->substreams_counter = 0; | 355 | dice->substreams_counter = 0; |