aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/gdrom.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-10-07 17:54:28 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:47:22 -0400
commitbbc1cc978404105da23d505163ce9fd5598ed5b1 (patch)
treecd0e1dfba91288338784dac3f9356aeadb3e713e /drivers/cdrom/gdrom.c
parent08f85851215100d0eebf026810955ee6ad456c38 (diff)
[PATCH] switch cdrom_{open,release,ioctl} to sane APIs
... convert to it in callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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 = {