]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/infiniband/core/device.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26
[mv-sheeva.git] / drivers / infiniband / core / device.c
index b583196420140a1d6825ff4ea59dae6771bdafb8..5ac5ffee05cbbc044c34aecfd6c1f323f719ec6e 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/mutex.h>
+#include <linux/workqueue.h>
 
 #include "core_priv.h"
 
@@ -119,12 +120,12 @@ static struct ib_device *__ib_device_get_by_name(const char *name)
 
 static int alloc_name(char *name)
 {
-       long *inuse;
+       unsigned long *inuse;
        char buf[IB_DEVICE_NAME_MAX];
        struct ib_device *device;
        int i;
 
-       inuse = (long *) get_zeroed_page(GFP_KERNEL);
+       inuse = (unsigned long *) get_zeroed_page(GFP_KERNEL);
        if (!inuse)
                return -ENOMEM;
 
@@ -701,7 +702,7 @@ int ib_find_pkey(struct ib_device *device,
                if (ret)
                        return ret;
 
-               if (pkey == tmp_pkey) {
+               if ((pkey & 0x7fff) == (tmp_pkey & 0x7fff)) {
                        *index = i;
                        return 0;
                }