diff options
Diffstat (limited to 'drivers/block/paride')
-rw-r--r-- | drivers/block/paride/pt.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 314333db16ee..5c74c3574a5a 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c | |||
@@ -190,8 +190,7 @@ module_param_array(drive3, int, NULL, 0); | |||
190 | #define ATAPI_LOG_SENSE 0x4d | 190 | #define ATAPI_LOG_SENSE 0x4d |
191 | 191 | ||
192 | static int pt_open(struct inode *inode, struct file *file); | 192 | static int pt_open(struct inode *inode, struct file *file); |
193 | static int pt_ioctl(struct inode *inode, struct file *file, | 193 | static long pt_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
194 | unsigned int cmd, unsigned long arg); | ||
195 | static int pt_release(struct inode *inode, struct file *file); | 194 | static int pt_release(struct inode *inode, struct file *file); |
196 | static ssize_t pt_read(struct file *filp, char __user *buf, | 195 | static ssize_t pt_read(struct file *filp, char __user *buf, |
197 | size_t count, loff_t * ppos); | 196 | size_t count, loff_t * ppos); |
@@ -237,7 +236,7 @@ static const struct file_operations pt_fops = { | |||
237 | .owner = THIS_MODULE, | 236 | .owner = THIS_MODULE, |
238 | .read = pt_read, | 237 | .read = pt_read, |
239 | .write = pt_write, | 238 | .write = pt_write, |
240 | .ioctl = pt_ioctl, | 239 | .unlocked_ioctl = pt_ioctl, |
241 | .open = pt_open, | 240 | .open = pt_open, |
242 | .release = pt_release, | 241 | .release = pt_release, |
243 | }; | 242 | }; |
@@ -691,8 +690,7 @@ out: | |||
691 | return err; | 690 | return err; |
692 | } | 691 | } |
693 | 692 | ||
694 | static int pt_ioctl(struct inode *inode, struct file *file, | 693 | static long pt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
695 | unsigned int cmd, unsigned long arg) | ||
696 | { | 694 | { |
697 | struct pt_unit *tape = file->private_data; | 695 | struct pt_unit *tape = file->private_data; |
698 | struct mtop __user *p = (void __user *)arg; | 696 | struct mtop __user *p = (void __user *)arg; |
@@ -706,23 +704,26 @@ static int pt_ioctl(struct inode *inode, struct file *file, | |||
706 | switch (mtop.mt_op) { | 704 | switch (mtop.mt_op) { |
707 | 705 | ||
708 | case MTREW: | 706 | case MTREW: |
707 | lock_kernel(); | ||
709 | pt_rewind(tape); | 708 | pt_rewind(tape); |
709 | unlock_kernel(); | ||
710 | return 0; | 710 | return 0; |
711 | 711 | ||
712 | case MTWEOF: | 712 | case MTWEOF: |
713 | lock_kernel(); | ||
713 | pt_write_fm(tape); | 714 | pt_write_fm(tape); |
715 | unlock_kernel(); | ||
714 | return 0; | 716 | return 0; |
715 | 717 | ||
716 | default: | 718 | default: |
717 | printk("%s: Unimplemented mt_op %d\n", tape->name, | 719 | /* FIXME: rate limit ?? */ |
720 | printk(KERN_DEBUG "%s: Unimplemented mt_op %d\n", tape->name, | ||
718 | mtop.mt_op); | 721 | mtop.mt_op); |
719 | return -EINVAL; | 722 | return -EINVAL; |
720 | } | 723 | } |
721 | 724 | ||
722 | default: | 725 | default: |
723 | printk("%s: Unimplemented ioctl 0x%x\n", tape->name, cmd); | 726 | return -ENOTTY; |
724 | return -EINVAL; | ||
725 | |||
726 | } | 727 | } |
727 | } | 728 | } |
728 | 729 | ||