aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/viocd.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/viocd.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/viocd.c')
-rw-r--r--drivers/cdrom/viocd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 031e0e1a1a3b..abc4079c3f41 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -154,20 +154,22 @@ static const struct file_operations proc_viocd_operations = {
154static int viocd_blk_open(struct inode *inode, struct file *file) 154static int viocd_blk_open(struct inode *inode, struct file *file)
155{ 155{
156 struct disk_info *di = inode->i_bdev->bd_disk->private_data; 156 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
157 return cdrom_open(&di->viocd_info, inode, file); 157 return cdrom_open(&di->viocd_info, inode->i_bdev, file->f_mode);
158} 158}
159 159
160static int viocd_blk_release(struct inode *inode, struct file *file) 160static int viocd_blk_release(struct inode *inode, struct file *file)
161{ 161{
162 struct disk_info *di = inode->i_bdev->bd_disk->private_data; 162 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
163 return cdrom_release(&di->viocd_info, file); 163 cdrom_release(&di->viocd_info, file ? file->f_mode : 0);
164 return 0;
164} 165}
165 166
166static int viocd_blk_ioctl(struct inode *inode, struct file *file, 167static int viocd_blk_ioctl(struct inode *inode, struct file *file,
167 unsigned cmd, unsigned long arg) 168 unsigned cmd, unsigned long arg)
168{ 169{
169 struct disk_info *di = inode->i_bdev->bd_disk->private_data; 170 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
170 return cdrom_ioctl(file, &di->viocd_info, inode, cmd, arg); 171 return cdrom_ioctl(&di->viocd_info, inode->i_bdev,
172 file ? file->f_mode : 0, cmd, arg);
171} 173}
172 174
173static int viocd_blk_media_changed(struct gendisk *disk) 175static int viocd_blk_media_changed(struct gendisk *disk)