diff options
Diffstat (limited to 'crypto/async_tx')
-rw-r--r-- | crypto/async_tx/async_tx.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c index 8cfac182165d..43fe4cbe71e6 100644 --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c | |||
@@ -198,8 +198,6 @@ dma_channel_add_remove(struct dma_client *client, | |||
198 | /* add the channel to the generic management list */ | 198 | /* add the channel to the generic management list */ |
199 | master_ref = kmalloc(sizeof(*master_ref), GFP_KERNEL); | 199 | master_ref = kmalloc(sizeof(*master_ref), GFP_KERNEL); |
200 | if (master_ref) { | 200 | if (master_ref) { |
201 | /* keep a reference until async_tx is unloaded */ | ||
202 | dma_chan_get(chan); | ||
203 | init_dma_chan_ref(master_ref, chan); | 201 | init_dma_chan_ref(master_ref, chan); |
204 | spin_lock_irqsave(&async_tx_lock, flags); | 202 | spin_lock_irqsave(&async_tx_lock, flags); |
205 | list_add_tail_rcu(&master_ref->node, | 203 | list_add_tail_rcu(&master_ref->node, |
@@ -221,8 +219,6 @@ dma_channel_add_remove(struct dma_client *client, | |||
221 | spin_lock_irqsave(&async_tx_lock, flags); | 219 | spin_lock_irqsave(&async_tx_lock, flags); |
222 | list_for_each_entry(ref, &async_tx_master_list, node) | 220 | list_for_each_entry(ref, &async_tx_master_list, node) |
223 | if (ref->chan == chan) { | 221 | if (ref->chan == chan) { |
224 | /* permit backing devices to go away */ | ||
225 | dma_chan_put(ref->chan); | ||
226 | list_del_rcu(&ref->node); | 222 | list_del_rcu(&ref->node); |
227 | call_rcu(&ref->rcu, free_dma_chan_ref); | 223 | call_rcu(&ref->rcu, free_dma_chan_ref); |
228 | found = 1; | 224 | found = 1; |