From bbc1cc978404105da23d505163ce9fd5598ed5b1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 7 Oct 2007 17:54:28 -0400 Subject: [PATCH] switch cdrom_{open,release,ioctl} to sane APIs ... convert to it in callers Signed-off-by: Al Viro --- drivers/cdrom/gdrom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/cdrom/gdrom.c') 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 = { 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 = { -- cgit v1.2.3