aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index cd21b34fe509..87d90200b169 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -2099,7 +2099,7 @@ static int idecd_open(struct inode *inode, struct file *file)
2099 if (!info) 2099 if (!info)
2100 return -ENXIO; 2100 return -ENXIO;
2101 2101
2102 rc = cdrom_open(&info->devinfo, inode, file); 2102 rc = cdrom_open(&info->devinfo, inode->i_bdev, file->f_mode);
2103 2103
2104 if (rc < 0) 2104 if (rc < 0)
2105 ide_cd_put(info); 2105 ide_cd_put(info);
@@ -2112,7 +2112,7 @@ static int idecd_release(struct inode *inode, struct file *file)
2112 struct gendisk *disk = inode->i_bdev->bd_disk; 2112 struct gendisk *disk = inode->i_bdev->bd_disk;
2113 struct cdrom_info *info = ide_drv_g(disk, cdrom_info); 2113 struct cdrom_info *info = ide_drv_g(disk, cdrom_info);
2114 2114
2115 cdrom_release(&info->devinfo, file); 2115 cdrom_release(&info->devinfo, file ? file->f_mode : 0);
2116 2116
2117 ide_cd_put(info); 2117 ide_cd_put(info);
2118 2118
@@ -2176,7 +2176,8 @@ static int idecd_ioctl(struct inode *inode, struct file *file,
2176 2176
2177 err = generic_ide_ioctl(info->drive, bdev, cmd, arg); 2177 err = generic_ide_ioctl(info->drive, bdev, cmd, arg);
2178 if (err == -EINVAL) 2178 if (err == -EINVAL)
2179 err = cdrom_ioctl(file, &info->devinfo, inode, cmd, arg); 2179 err = cdrom_ioctl(&info->devinfo, bdev,
2180 file ? file->f_mode : 0, cmd, arg);
2180 2181
2181 return err; 2182 return err;
2182} 2183}