aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/pktcdvd.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-08-29 00:56:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:47:24 -0400
commita0eb62a0a4470fef5a5f41e7f1442fdd667220ef (patch)
tree4d8639a082bc6a4226a2f2c3dab814ca1d349be9 /drivers/block/pktcdvd.c
parentbbc1cc978404105da23d505163ce9fd5598ed5b1 (diff)
[PATCH] switch pktcdvd to blkdev_driver_ioctl()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r--drivers/block/pktcdvd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 4d581e8ba9f6..bdd49abcb546 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2803,6 +2803,14 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
2803 VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, imajor(inode), iminor(inode)); 2803 VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, imajor(inode), iminor(inode));
2804 2804
2805 switch (cmd) { 2805 switch (cmd) {
2806 case CDROMEJECT:
2807 /*
2808 * The door gets locked when the device is opened, so we
2809 * have to unlock it or else the eject command fails.
2810 */
2811 if (pd->refcnt == 1)
2812 pkt_lock_door(pd, 0);
2813 /* fallthru */
2806 /* 2814 /*
2807 * forward selected CDROM ioctls to CD-ROM, for UDF 2815 * forward selected CDROM ioctls to CD-ROM, for UDF
2808 */ 2816 */
@@ -2811,16 +2819,8 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
2811 case CDROM_LAST_WRITTEN: 2819 case CDROM_LAST_WRITTEN:
2812 case CDROM_SEND_PACKET: 2820 case CDROM_SEND_PACKET:
2813 case SCSI_IOCTL_SEND_COMMAND: 2821 case SCSI_IOCTL_SEND_COMMAND:
2814 return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg); 2822 return blkdev_driver_ioctl(pd->bdev->bd_inode, pd->bdev->bd_disk,
2815 2823 file, cmd, arg);
2816 case CDROMEJECT:
2817 /*
2818 * The door gets locked when the device is opened, so we
2819 * have to unlock it or else the eject command fails.
2820 */
2821 if (pd->refcnt == 1)
2822 pkt_lock_door(pd, 0);
2823 return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg);
2824 2824
2825 default: 2825 default:
2826 VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd); 2826 VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd);