Skip to content

Commit a0eb62a

Browse files
author
Al Viro
committed
[PATCH] switch pktcdvd to blkdev_driver_ioctl()
Signed-off-by: Al Viro <[email protected]>
1 parent bbc1cc9 commit a0eb62a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/block/pktcdvd.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,14 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
28032803
VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, imajor(inode), iminor(inode));
28042804

28052805
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 */
28062814
/*
28072815
* forward selected CDROM ioctls to CD-ROM, for UDF
28082816
*/
@@ -2811,16 +2819,8 @@ static int pkt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
28112819
case CDROM_LAST_WRITTEN:
28122820
case CDROM_SEND_PACKET:
28132821
case SCSI_IOCTL_SEND_COMMAND:
2814-
return blkdev_ioctl(pd->bdev->bd_inode, file, cmd, arg);
2815-
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);
2822+
return blkdev_driver_ioctl(pd->bdev->bd_inode, pd->bdev->bd_disk,
2823+
file, cmd, arg);
28242824

28252825
default:
28262826
VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd);

0 commit comments

Comments
 (0)