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.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 66ce41489133..d84beb994f36 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -120,11 +120,6 @@ static const char *type2name[4] = { "single", "page",
120static const char *dir2name[4] = { "DMA_BIDIRECTIONAL", "DMA_TO_DEVICE", 120static const char *dir2name[4] = { "DMA_BIDIRECTIONAL", "DMA_TO_DEVICE",
121 "DMA_FROM_DEVICE", "DMA_NONE" }; 121 "DMA_FROM_DEVICE", "DMA_NONE" };
122 122
123/* little merge helper - remove it after the merge window */
124#ifndef BUS_NOTIFY_UNBOUND_DRIVER
125#define BUS_NOTIFY_UNBOUND_DRIVER 0x0005
126#endif
127
128/* 123/*
129 * The access to some variables in this macro is racy. We can't use atomic_t 124 * The access to some variables in this macro is racy. We can't use atomic_t
130 * here because all these variables are exported to debugfs. Some of them even 125 * here because all these variables are exported to debugfs. Some of them even
@@ -269,7 +264,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket,
269 match_fn match) 264 match_fn match)
270{ 265{
271 struct dma_debug_entry *entry, *ret = NULL; 266 struct dma_debug_entry *entry, *ret = NULL;
272 int matches = 0, match_lvl, last_lvl = 0; 267 int matches = 0, match_lvl, last_lvl = -1;
273 268
274 list_for_each_entry(entry, &bucket->list, list) { 269 list_for_each_entry(entry, &bucket->list, list) {
275 if (!match(ref, entry)) 270 if (!match(ref, entry))
@@ -298,7 +293,7 @@ static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket,
298 } else if (match_lvl > last_lvl) { 293 } else if (match_lvl > last_lvl) {
299 /* 294 /*
300 * We found an entry that fits better then the 295 * We found an entry that fits better then the
301 * previous one 296 * previous one or it is the 1st match.
302 */ 297 */
303 last_lvl = match_lvl; 298 last_lvl = match_lvl;
304 ret = entry; 299 ret = entry;