diff options
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r-- | drivers/ide/ide-tape.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 6a0e62542167..b07232880ec9 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -1365,7 +1365,7 @@ static int idetape_mtioctop(ide_drive_t *drive, short mt_op, int mt_count) | |||
1365 | * supported here, and not in the corresponding block interface. Our own | 1365 | * supported here, and not in the corresponding block interface. Our own |
1366 | * ide-tape ioctls are supported on both interfaces. | 1366 | * ide-tape ioctls are supported on both interfaces. |
1367 | */ | 1367 | */ |
1368 | static int idetape_chrdev_ioctl(struct inode *inode, struct file *file, | 1368 | static long do_idetape_chrdev_ioctl(struct file *file, |
1369 | unsigned int cmd, unsigned long arg) | 1369 | unsigned int cmd, unsigned long arg) |
1370 | { | 1370 | { |
1371 | struct ide_tape_obj *tape = file->private_data; | 1371 | struct ide_tape_obj *tape = file->private_data; |
@@ -1420,6 +1420,16 @@ static int idetape_chrdev_ioctl(struct inode *inode, struct file *file, | |||
1420 | } | 1420 | } |
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | static long idetape_chrdev_ioctl(struct file *file, | ||
1424 | unsigned int cmd, unsigned long arg) | ||
1425 | { | ||
1426 | long ret; | ||
1427 | lock_kernel(); | ||
1428 | ret = do_idetape_chrdev_ioctl(file, cmd, arg); | ||
1429 | unlock_kernel(); | ||
1430 | return ret; | ||
1431 | } | ||
1432 | |||
1423 | /* | 1433 | /* |
1424 | * Do a mode sense page 0 with block descriptor and if it succeeds set the tape | 1434 | * Do a mode sense page 0 with block descriptor and if it succeeds set the tape |
1425 | * block size with the reported value. | 1435 | * block size with the reported value. |
@@ -1888,7 +1898,7 @@ static const struct file_operations idetape_fops = { | |||
1888 | .owner = THIS_MODULE, | 1898 | .owner = THIS_MODULE, |
1889 | .read = idetape_chrdev_read, | 1899 | .read = idetape_chrdev_read, |
1890 | .write = idetape_chrdev_write, | 1900 | .write = idetape_chrdev_write, |
1891 | .ioctl = idetape_chrdev_ioctl, | 1901 | .unlocked_ioctl = idetape_chrdev_ioctl, |
1892 | .open = idetape_chrdev_open, | 1902 | .open = idetape_chrdev_open, |
1893 | .release = idetape_chrdev_release, | 1903 | .release = idetape_chrdev_release, |
1894 | }; | 1904 | }; |