Merge branch 'dma-debug/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
authorIngo Molnar <mingo@elte.hu>
Fri, 3 Jul 2009 09:03:10 +0000 (11:03 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 3 Jul 2009 09:03:10 +0000 (11:03 +0200)
lib/dma-debug.c

index 3b93129a968c73b1d6eeff421abb76b38bc668dd..c9187fed0b9385721f419996fba7cd26a0f8785a 100644 (file)
@@ -716,7 +716,7 @@ void dma_debug_init(u32 num_entries)
 
        for (i = 0; i < HASH_SIZE; ++i) {
                INIT_LIST_HEAD(&dma_entry_hash[i].list);
-               dma_entry_hash[i].lock = SPIN_LOCK_UNLOCKED;
+               spin_lock_init(&dma_entry_hash[i].lock);
        }
 
        if (dma_debug_fs_init() != 0) {
@@ -862,7 +862,7 @@ static inline bool overlap(void *addr, u64 size, void *start, void *end)
 
        return ((addr >= start && addr < end) ||
                (addr2 >= start && addr2 < end) ||
-               ((addr < start) && (addr2 >= end)));
+               ((addr < start) && (addr2 > end)));
 }
 
 static void check_for_illegal_area(struct device *dev, void *addr, u64 size)