diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-08-29 08:56:32 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 15:47:24 +0400 |
commit | a0eb62a0a4470fef5a5f41e7f1442fdd667220ef (patch) | |
tree | 4d8639a082bc6a4226a2f2c3dab814ca1d349be9 /drivers | |
parent | bbc1cc978404105da23d505163ce9fd5598ed5b1 (diff) | |
download | linux-a0eb62a0a4470fef5a5f41e7f1442fdd667220ef.tar.xz |
[PATCH] switch pktcdvd to blkdev_driver_ioctl()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/pktcdvd.c | 20 |
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 VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, imajor(inode), iminor(inode)); switch (cmd) { + case CDROMEJECT: + /* + * The door gets locked when the device is opened, so we + * have to unlock it or else the eject command fails. + */ + if (pd->refcnt == 1) + pkt_lock_door(pd, 0); + /* fallthru */ /* * forward selected CDROM ioctls to CD-ROM, for UDF */ @@ -2811,16 +2819,8 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u case CDROM_LAST_WRITTEN: case CDROM_SEND_PACKET: case SCSI_IOCTL_SEND_COMMAND: - return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg); - - case CDROMEJECT: - /* - * The door gets locked when the device is opened, so we - * have to unlock it or else the eject command fails. - */ - if (pd->refcnt == 1) - pkt_lock_door(pd, 0); - return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg); + return blkdev_driver_ioctl(pd->bdev->bd_inode, pd->bdev->bd_disk, + file, cmd, arg); default: VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd); |