diff options
Diffstat (limited to 'drivers/cdrom/viocd.c')
-rw-r--r-- | drivers/cdrom/viocd.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 031e0e1a1a3b..13929356135c 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -151,23 +151,24 @@ static const struct file_operations proc_viocd_operations = { | |||
151 | .release = single_release, | 151 | .release = single_release, |
152 | }; | 152 | }; |
153 | 153 | ||
154 | static int viocd_blk_open(struct inode *inode, struct file *file) | 154 | static int viocd_blk_open(struct block_device *bdev, fmode_t mode) |
155 | { | 155 | { |
156 | struct disk_info *di = inode->i_bdev->bd_disk->private_data; | 156 | struct disk_info *di = bdev->bd_disk->private_data; |
157 | return cdrom_open(&di->viocd_info, inode, file); | 157 | return cdrom_open(&di->viocd_info, bdev, mode); |
158 | } | 158 | } |
159 | 159 | ||
160 | static int viocd_blk_release(struct inode *inode, struct file *file) | 160 | static int viocd_blk_release(struct gendisk *disk, fmode_t mode) |
161 | { | 161 | { |
162 | struct disk_info *di = inode->i_bdev->bd_disk->private_data; | 162 | struct disk_info *di = disk->private_data; |
163 | return cdrom_release(&di->viocd_info, file); | 163 | cdrom_release(&di->viocd_info, mode); |
164 | return 0; | ||
164 | } | 165 | } |
165 | 166 | ||
166 | static int viocd_blk_ioctl(struct inode *inode, struct file *file, | 167 | static int viocd_blk_ioctl(struct block_device *bdev, fmode_t mode, |
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 = bdev->bd_disk->private_data; |
170 | return cdrom_ioctl(file, &di->viocd_info, inode, cmd, arg); | 171 | return cdrom_ioctl(&di->viocd_info, bdev, mode, cmd, arg); |
171 | } | 172 | } |
172 | 173 | ||
173 | static int viocd_blk_media_changed(struct gendisk *disk) | 174 | static int viocd_blk_media_changed(struct gendisk *disk) |
@@ -180,7 +181,7 @@ struct block_device_operations viocd_fops = { | |||
180 | .owner = THIS_MODULE, | 181 | .owner = THIS_MODULE, |
181 | .open = viocd_blk_open, | 182 | .open = viocd_blk_open, |
182 | .release = viocd_blk_release, | 183 | .release = viocd_blk_release, |
183 | .ioctl = viocd_blk_ioctl, | 184 | .locked_ioctl = viocd_blk_ioctl, |
184 | .media_changed = viocd_blk_media_changed, | 185 | .media_changed = viocd_blk_media_changed, |
185 | }; | 186 | }; |
186 | 187 | ||