aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/gdrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom/gdrom.c')
-rw-r--r--drivers/cdrom/gdrom.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index d6ba77a2dd7b..0959edf2afdb 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -492,12 +492,12 @@ static struct cdrom_device_ops gdrom_ops = {
492 492
493static int gdrom_bdops_open(struct inode *inode, struct file *file) 493static int gdrom_bdops_open(struct inode *inode, struct file *file)
494{ 494{
495 return cdrom_open(gd.cd_info, inode, file); 495 return cdrom_open(gd.cd_info, inode->i_bdev, file->f_mode);
496} 496}
497 497
498static int gdrom_bdops_release(struct inode *inode, struct file *file) 498static int gdrom_bdops_release(struct inode *inode, struct file *file)
499{ 499{
500 return cdrom_release(gd.cd_info, file); 500 return cdrom_release(gd.cd_info, file ? file->f_mode : 0);
501} 501}
502 502
503static int gdrom_bdops_mediachanged(struct gendisk *disk) 503static int gdrom_bdops_mediachanged(struct gendisk *disk)
@@ -508,7 +508,8 @@ static int gdrom_bdops_mediachanged(struct gendisk *disk)
508static int gdrom_bdops_ioctl(struct inode *inode, struct file *file, 508static int gdrom_bdops_ioctl(struct inode *inode, struct file *file,
509 unsigned cmd, unsigned long arg) 509 unsigned cmd, unsigned long arg)
510{ 510{
511 return cdrom_ioctl(file, gd.cd_info, inode, cmd, arg); 511 return cdrom_ioctl(gd.cd_info, inode->i_bdev,
512 file ? file->f_mode : 0, cmd, arg);
512} 513}
513 514
514static struct block_device_operations gdrom_bdops = { 515static struct block_device_operations gdrom_bdops = {