aboutsummaryrefslogtreecommitdiff
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 d6ba77a2dd7..0959edf2afd 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -492,12 +492,12 @@ static struct cdrom_device_ops gdrom_ops = {
static int gdrom_bdops_open(struct inode *inode, struct file *file)
{
- return cdrom_open(gd.cd_info, inode, file);
+ return cdrom_open(gd.cd_info, inode->i_bdev, file->f_mode);
}
static int gdrom_bdops_release(struct inode *inode, struct file *file)
{
- return cdrom_release(gd.cd_info, file);
+ return cdrom_release(gd.cd_info, file ? file->f_mode : 0);
}
static int gdrom_bdops_mediachanged(struct gendisk *disk)
@@ -508,7 +508,8 @@ static int gdrom_bdops_mediachanged(struct gendisk *disk)
static int gdrom_bdops_ioctl(struct inode *inode, struct file *file,
unsigned cmd, unsigned long arg)
{
- return cdrom_ioctl(file, gd.cd_info, inode, cmd, arg);
+ return cdrom_ioctl(gd.cd_info, inode->i_bdev,
+ file ? file->f_mode : 0, cmd, arg);
}
static struct block_device_operations gdrom_bdops = {