bitmap.h: remove dead artifacts
[linux-block.git] / drivers / base / dmapool.c
index 9406259754adaabd21748bbd3f787b81863663ec..fbae8674e491f105269c30a1f10e1c9c4b9929cc 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/poison.h>
+#include <linux/sched.h>
 
 /*
  * Pool allocator ... wraps the dma_alloc_coherent page allocator, so
@@ -126,7 +127,7 @@ dma_pool_create (const char *name, struct device *dev,
        } else if (allocation < size)
                return NULL;
 
-       if (!(retval = kmalloc (sizeof *retval, GFP_KERNEL)))
+       if (!(retval = kmalloc_node (sizeof *retval, GFP_KERNEL, dev_to_node(dev))))
                return retval;
 
        strlcpy (retval->name, name, sizeof retval->name);
@@ -301,7 +302,7 @@ restart:
                if (mem_flags & __GFP_WAIT) {
                        DECLARE_WAITQUEUE (wait, current);
 
-                       current->state = TASK_INTERRUPTIBLE;
+                       __set_current_state(TASK_INTERRUPTIBLE);
                        add_wait_queue (&pool->waitq, &wait);
                        spin_unlock_irqrestore (&pool->lock, flags);