Merge branch 'for-linus' of git://neil.brown.name/md
[safe/jmp/linux-2.6] / drivers / char / viotape.c
index d4db42c..ffc9254 100644 (file)
@@ -699,6 +699,7 @@ static int viotap_open(struct inode *inode, struct file *file)
        if (op == NULL)
                return -ENOMEM;
 
+       lock_kernel();
        get_dev_info(file->f_path.dentry->d_inode, &devi);
 
        /* Note: We currently only support one mode! */
@@ -729,6 +730,7 @@ static int viotap_open(struct inode *inode, struct file *file)
 
 free_op:
        free_op_struct(op);
+       unlock_kernel();
        return ret;
 }
 
@@ -884,10 +886,10 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
        state[i].cur_part = 0;
        for (j = 0; j < MAX_PARTITIONS; ++j)
                state[i].part_stat_rwi[j] = VIOT_IDLE;
-       device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i),
-                       "iseries!vt%d", i);
-       device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
-                       "iseries!nvt%d", i);
+       device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL,
+                     "iseries!vt%d", i);
+       device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), NULL,
+                     "iseries!nvt%d", i);
        printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries "
                        "resource %10.10s type %4.4s, model %3.3s\n",
                        i, viotape_unitinfo[i].rsrcname,