diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-10-07 23:54:28 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 13:47:22 +0200 |
commit | bbc1cc978404105da23d505163ce9fd5598ed5b1 (patch) | |
tree | cd0e1dfba91288338784dac3f9356aeadb3e713e /drivers/ide | |
parent | [PATCH] move block_device_operations to blkdev.h (diff) | |
download | linux-bbc1cc978404105da23d505163ce9fd5598ed5b1.tar.xz linux-bbc1cc978404105da23d505163ce9fd5598ed5b1.zip |
[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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index cd21b34fe509..87d90200b169 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; } |