include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / infiniband / hw / ipath / ipath_file_ops.c
index 2317398..9c5c66d 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/cdev.h>
 #include <linux/swap.h>
 #include <linux/vmalloc.h>
+#include <linux/slab.h>
 #include <linux/highmem.h>
 #include <linux/io.h>
 #include <linux/jiffies.h>
@@ -1151,7 +1152,7 @@ static int ipath_file_vma_fault(struct vm_area_struct *vma,
        return 0;
 }
 
-static struct vm_operations_struct ipath_file_vm_ops = {
+static const struct vm_operations_struct ipath_file_vm_ops = {
        .fault = ipath_file_vma_fault,
 };
 
@@ -1616,7 +1617,7 @@ static int try_alloc_port(struct ipath_devdata *dd, int port,
                pd->port_cnt = 1;
                port_fp(fp) = pd;
                pd->port_pid = get_pid(task_pid(current));
-               strncpy(pd->port_comm, current->comm, sizeof(pd->port_comm));
+               strlcpy(pd->port_comm, current->comm, sizeof(pd->port_comm));
                ipath_stats.sps_ports++;
                ret = 0;
        } else
@@ -1821,7 +1822,6 @@ done:
 static int ipath_open(struct inode *in, struct file *fp)
 {
        /* The real work is performed later in ipath_assign_port() */
-       cycle_kernel_lock();
        fp->private_data = kzalloc(sizeof(struct ipath_filedata), GFP_KERNEL);
        return fp->private_data ? 0 : -ENOMEM;
 }