V4L/DVB (11303): tda7432: remove legacy code for old-style i2c API
[safe/jmp/linux-2.6] / drivers / media / video / videobuf-dma-contig.c
index 2475535..6109fb5 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/mm.h>
 #include <linux/dma-mapping.h>
 #include <media/videobuf-dma-contig.h>
 
@@ -27,10 +28,10 @@ struct videobuf_dma_contig_memory {
 };
 
 #define MAGIC_DC_MEM 0x0733ac61
-#define MAGIC_CHECK(is, should)                                                \
-       if (unlikely((is) != (should))) {                               \
-               pr_err("magic mismatch: %x expected %x\n", is, should); \
-               BUG();                                                  \
+#define MAGIC_CHECK(is, should)                                                    \
+       if (unlikely((is) != (should))) {                                   \
+               pr_err("magic mismatch: %x expected %x\n", (is), (should)); \
+               BUG();                                                      \
        }
 
 static void
@@ -399,7 +400,7 @@ void videobuf_dma_contig_free(struct videobuf_queue *q,
           So, it should free memory only if the memory were allocated for
           read() operation.
         */
-       if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr)
+       if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr)
                return;
 
        if (!mem)