aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/viocd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom/viocd.c')
-rw-r--r--drivers/cdrom/viocd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 031e0e1a1a3b..abc4079c3f41 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -154,20 +154,22 @@ static const struct file_operations proc_viocd_operations = {
154static int viocd_blk_open(struct inode *inode, struct file *file) 154static int viocd_blk_open(struct inode *inode, struct file *file)
155{ 155{
156 struct disk_info *di = inode->i_bdev->bd_disk->private_data; 156 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
157 return cdrom_open(&di->viocd_info, inode, file); 157 return cdrom_open(&di->viocd_info, inode->i_bdev, file->f_mode);
158} 158}
159 159
160static int viocd_blk_release(struct inode *inode, struct file *file) 160static int viocd_blk_release(struct inode *inode, struct file *file)
161{ 161{
162 struct disk_info *di = inode->i_bdev->bd_disk->private_data; 162 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
163 return cdrom_release(&di->viocd_info, file); 163 cdrom_release(&di->viocd_info, file ? file->f_mode : 0);
164 return 0;
164} 165}
165 166
166static int viocd_blk_ioctl(struct inode *inode, struct file *file, 167static int viocd_blk_ioctl(struct inode *inode, struct file *file,
167 unsigned cmd, unsigned long arg) 168 unsigned cmd, unsigned long arg)
168{ 169{
169 struct disk_info *di = inode->i_bdev->bd_disk->private_data; 170 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
170 return cdrom_ioctl(file, &di->viocd_info, inode, cmd, arg); 171 return cdrom_ioctl(&di->viocd_info, inode->i_bdev,
172 file ? file->f_mode : 0, cmd, arg);
171} 173}
172 174
173static int viocd_blk_media_changed(struct gendisk *disk) 175static int viocd_blk_media_changed(struct gendisk *disk)