X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fchar%2Fviotape.c;h=7a70a40ad639855b4f3880386ef7b34f47d71f46;hb=837b41b5de356aa67abb2cadb5eef3efc7776f91;hp=977f7d35e76916cc774ff4bf72c9f67e3ecd3eca;hpb=948769a5ba304ed3329a2f42ee3561f04a0b5692;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 977f7d35e76..7a70a40ad63 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -678,6 +678,17 @@ free_op: return ret; } +static long viotap_unlocked_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) +{ + long rc; + + lock_kernel(); + rc = viotap_ioctl(file->f_path.dentry->d_inode, file, cmd, arg); + unlock_kernel(); + return rc; +} + static int viotap_open(struct inode *inode, struct file *file) { HvLpEvent_Rc hvrc; @@ -786,12 +797,12 @@ free_op: } const struct file_operations viotap_fops = { - .owner = THIS_MODULE, - .read = viotap_read, - .write = viotap_write, - .ioctl = viotap_ioctl, - .open = viotap_open, - .release = viotap_release, + .owner = THIS_MODULE, + .read = viotap_read, + .write = viotap_write, + .unlocked_ioctl = viotap_unlocked_ioctl, + .open = viotap_open, + .release = viotap_release, }; /* Handle interrupt events for tape */ @@ -875,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_drvdata(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), + NULL, "iseries!vt%d", i); + device_create_drvdata(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,