diff -urN B5-amiflop-methods/drivers/block/paride/pcd.c B5-cdrom_ioctl/drivers/block/paride/pcd.c --- B5-amiflop-methods/drivers/block/paride/pcd.c Sat Aug 9 02:20:46 2003 +++ B5-cdrom_ioctl/drivers/block/paride/pcd.c Fri Sep 26 22:00:29 2003 @@ -259,7 +259,7 @@ unsigned cmd, unsigned long arg) { struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; - return cdrom_ioctl(&cd->info, inode, cmd, arg); + return cdrom_ioctl(&cd->info, inode->i_bdev, cmd, arg); } static int pcd_block_media_changed(struct gendisk *disk) diff -urN B5-amiflop-methods/drivers/cdrom/cdrom.c B5-cdrom_ioctl/drivers/cdrom/cdrom.c --- B5-amiflop-methods/drivers/cdrom/cdrom.c Mon Sep 8 19:25:05 2003 +++ B5-cdrom_ioctl/drivers/cdrom/cdrom.c Fri Sep 26 22:00:29 2003 @@ -1433,14 +1433,14 @@ * these days. ATAPI / SCSI specific code now mainly resides in * mmc_ioct(). */ -int cdrom_ioctl(struct cdrom_device_info *cdi, struct inode *ip, +int cdrom_ioctl(struct cdrom_device_info *cdi, block_device *bdev, unsigned int cmd, unsigned long arg) { struct cdrom_device_ops *cdo = cdi->ops; int ret; /* Try the generic SCSI command ioctl's first.. */ - ret = scsi_cmd_ioctl(ip->i_bdev, cmd, arg); + ret = scsi_cmd_ioctl(bdev, cmd, arg); if (ret != -ENOTTY) return ret; @@ -1593,7 +1593,7 @@ cdinfo(CD_DO_IOCTL, "entering CDROM_RESET\n"); if (!CDROM_CAN(CDC_RESET)) return -ENOSYS; - invalidate_bdev(ip->i_bdev, 0); + invalidate_bdev(bdev, 0); return cdo->reset(cdi); } diff -urN B5-amiflop-methods/drivers/cdrom/cdu31a.c B5-cdrom_ioctl/drivers/cdrom/cdu31a.c --- B5-amiflop-methods/drivers/cdrom/cdu31a.c Mon Sep 8 19:25:05 2003 +++ B5-cdrom_ioctl/drivers/cdrom/cdu31a.c Fri Sep 26 22:00:29 2003 @@ -3180,7 +3180,7 @@ static int scd_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, unsigned long arg) { - return cdrom_ioctl(&scd_info, inode, cmd, arg); + return cdrom_ioctl(&scd_info, inode->i_bdev, cmd, arg); } static int scd_block_media_changed(struct gendisk *disk) diff -urN B5-amiflop-methods/drivers/cdrom/cm206.c B5-cdrom_ioctl/drivers/cdrom/cm206.c --- B5-amiflop-methods/drivers/cdrom/cm206.c Mon Sep 8 19:25:05 2003 +++ B5-cdrom_ioctl/drivers/cdrom/cm206.c Fri Sep 26 22:00:29 2003 @@ -1363,7 +1363,7 @@ static int cm206_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, unsigned long arg) { - return cdrom_ioctl(&cm206_info, inode, cmd, arg); + return cdrom_ioctl(&cm206_info, inode->i_bdev, cmd, arg); } static int cm206_block_media_changed(struct gendisk *disk) diff -urN B5-amiflop-methods/drivers/cdrom/mcd.c B5-cdrom_ioctl/drivers/cdrom/mcd.c --- B5-amiflop-methods/drivers/cdrom/mcd.c Mon Sep 8 19:25:05 2003 +++ B5-cdrom_ioctl/drivers/cdrom/mcd.c Fri Sep 26 22:00:29 2003 @@ -227,7 +227,7 @@ static int mcd_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, unsigned long arg) { - return cdrom_ioctl(&mcd_info, inode, cmd, arg); + return cdrom_ioctl(&mcd_info, inode->i_bdev, cmd, arg); } static int mcd_block_media_changed(struct gendisk *disk) diff -urN B5-amiflop-methods/drivers/cdrom/mcdx.c B5-cdrom_ioctl/drivers/cdrom/mcdx.c --- B5-amiflop-methods/drivers/cdrom/mcdx.c Mon Sep 8 19:25:05 2003 +++ B5-cdrom_ioctl/drivers/cdrom/mcdx.c Fri Sep 26 22:00:29 2003 @@ -237,7 +237,7 @@ unsigned cmd, unsigned long arg) { struct s_drive_stuff *p = inode->i_bdev->bd_disk->private_data; - return cdrom_ioctl(&p->info, inode, cmd, arg); + return cdrom_ioctl(&p->info, inode->i_bdev, cmd, arg); } static int mcdx_block_media_changed(struct gendisk *disk) diff -urN B5-amiflop-methods/drivers/cdrom/sbpcd.c B5-cdrom_ioctl/drivers/cdrom/sbpcd.c --- B5-amiflop-methods/drivers/cdrom/sbpcd.c Mon Sep 8 19:25:05 2003 +++ B5-cdrom_ioctl/drivers/cdrom/sbpcd.c Fri Sep 26 22:00:29 2003 @@ -5373,7 +5373,7 @@ unsigned cmd, unsigned long arg) { struct sbpcd_drive *p = inode->i_bdev->bd_disk->private_data; - return cdrom_ioctl(p->sbpcd_infop, inode, cmd, arg); + return cdrom_ioctl(p->sbpcd_infop, inode->i_bdev, cmd, arg); } static int sbpcd_block_media_changed(struct gendisk *disk) diff -urN B5-amiflop-methods/drivers/ide/ide-cd.c B5-cdrom_ioctl/drivers/ide/ide-cd.c --- B5-amiflop-methods/drivers/ide/ide-cd.c Mon Sep 8 19:25:11 2003 +++ B5-cdrom_ioctl/drivers/ide/ide-cd.c Fri Sep 26 22:00:29 2003 @@ -3363,7 +3363,7 @@ int err = generic_ide_ioctl(bdev, cmd, arg); if (err == -EINVAL) { struct cdrom_info *info = drive->driver_data; - err = cdrom_ioctl(&info->devinfo, inode, cmd, arg); + err = cdrom_ioctl(&info->devinfo, inode->i_bdev, cmd, arg); } return err; } diff -urN B5-amiflop-methods/drivers/scsi/sr.c B5-cdrom_ioctl/drivers/scsi/sr.c --- B5-amiflop-methods/drivers/scsi/sr.c Mon Sep 8 19:25:15 2003 +++ B5-cdrom_ioctl/drivers/scsi/sr.c Fri Sep 26 22:00:29 2003 @@ -441,7 +441,7 @@ case SCSI_IOCTL_GET_BUS_NUMBER: return scsi_ioctl(sdev, cmd, (void *)arg); } - return cdrom_ioctl(&cd->cdi, inode, cmd, arg); + return cdrom_ioctl(&cd->cdi, inode->i_bdev, cmd, arg); } static int sr_block_media_changed(struct gendisk *disk) diff -urN B5-amiflop-methods/include/linux/cdrom.h B5-cdrom_ioctl/include/linux/cdrom.h --- B5-amiflop-methods/include/linux/cdrom.h Thu Jul 10 13:40:27 2003 +++ B5-cdrom_ioctl/include/linux/cdrom.h Fri Sep 26 22:00:29 2003 @@ -778,7 +778,7 @@ /* the general block_device operations structure: */ extern int cdrom_open(struct cdrom_device_info *, struct inode *, struct file *); extern int cdrom_release(struct cdrom_device_info *, struct file *); -extern int cdrom_ioctl(struct cdrom_device_info *, struct inode *, unsigned, unsigned long); +extern int cdrom_ioctl(struct cdrom_device_info *, struct block_device *, unsigned, unsigned long); extern int cdrom_media_changed(struct cdrom_device_info *); extern int register_cdrom(struct cdrom_device_info *cdi);