summaryrefslogtreecommitdiffstats
path: root/drivers/ide
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/ide
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/ide')
-rw-r--r--drivers/ide/ide-cd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index cd21b34fe50..87d90200b16 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -2099,7 +2099,7 @@ static int idecd_open(struct inode *inode, struct file *file)
if (!info)
return -ENXIO;
- rc = cdrom_open(&info->devinfo, inode, file);
+ rc = cdrom_open(&info->devinfo, inode->i_bdev, file->f_mode);
if (rc < 0)
ide_cd_put(info);
@@ -2112,7 +2112,7 @@ static int idecd_release(struct inode *inode, struct file *file)
struct gendisk *disk = inode->i_bdev->bd_disk;
struct cdrom_info *info = ide_drv_g(disk, cdrom_info);
- cdrom_release(&info->devinfo, file);
+ cdrom_release(&info->devinfo, file ? file->f_mode : 0);
ide_cd_put(info);
@@ -2176,7 +2176,8 @@ static int idecd_ioctl(struct inode *inode, struct file *file,
err = generic_ide_ioctl(info->drive, bdev, cmd, arg);
if (err == -EINVAL)
- err = cdrom_ioctl(file, &info->devinfo, inode, cmd, arg);
+ err = cdrom_ioctl(&info->devinfo, bdev,
+ file ? file->f_mode : 0, cmd, arg);
return err;
}