Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145936
b: refs/heads/master
c: be81c6e
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed Jun 8, 2009
1 parent 12b65c5 commit 801137d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7ed70eedccc78e79ce6da2155e9caf90aff4003
refs/heads/master: be81c6ea23b8b471141734ef4bc005f5127aaf43
8 changes: 6 additions & 2 deletions trunk/lib/dma-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,15 +649,19 @@ static int device_dma_allocations(struct device *dev)
unsigned long flags;
int count = 0, i;

local_irq_save(flags);

for (i = 0; i < HASH_SIZE; ++i) {
spin_lock_irqsave(&dma_entry_hash[i].lock, flags);
spin_lock(&dma_entry_hash[i].lock);
list_for_each_entry(entry, &dma_entry_hash[i].list, list) {
if (entry->dev == dev)
count += 1;
}
spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags);
spin_unlock(&dma_entry_hash[i].lock);
}

local_irq_restore(flags);

return count;
}

Expand Down

0 comments on commit 801137d

Please sign in to comment.