aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dma-debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r--lib/dma-debug.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 24c4a2c5d61c..27b369da52c0 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -649,15 +649,19 @@ static int device_dma_allocations(struct device *dev)
649 unsigned long flags; 649 unsigned long flags;
650 int count = 0, i; 650 int count = 0, i;
651 651
652 local_irq_save(flags);
653
652 for (i = 0; i < HASH_SIZE; ++i) { 654 for (i = 0; i < HASH_SIZE; ++i) {
653 spin_lock_irqsave(&dma_entry_hash[i].lock, flags); 655 spin_lock(&dma_entry_hash[i].lock);
654 list_for_each_entry(entry, &dma_entry_hash[i].list, list) { 656 list_for_each_entry(entry, &dma_entry_hash[i].list, list) {
655 if (entry->dev == dev) 657 if (entry->dev == dev)
656 count += 1; 658 count += 1;
657 } 659 }
658 spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags); 660 spin_unlock(&dma_entry_hash[i].lock);
659 } 661 }
660 662
663 local_irq_restore(flags);
664
661 return count; 665 return count;
662} 666}
663 667