diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 10:25:44 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:21 -0400 |
commit | 4e379ae6a6b6c7b0c4274476af807ffffe42534f (patch) | |
tree | 16e4890f53559cae6a9145be0dec925c7c7bdeb7 /drivers/cdrom/viocd.c | |
parent | 8389feb4a8b9c29836c320e51677bd4650713fa8 (diff) |
[PATCH] switch viocd
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/cdrom/viocd.c')
-rw-r--r-- | drivers/cdrom/viocd.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 57c2dced3e9d..13929356135c 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -151,25 +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->i_bdev, file->f_mode); | 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 | cdrom_release(&di->viocd_info, file ? file->f_mode : 0); | 163 | cdrom_release(&di->viocd_info, mode); |
164 | return 0; | 164 | return 0; |
165 | } | 165 | } |
166 | 166 | ||
167 | static int viocd_blk_ioctl(struct inode *inode, struct file *file, | 167 | static int viocd_blk_ioctl(struct block_device *bdev, fmode_t mode, |
168 | unsigned cmd, unsigned long arg) | 168 | unsigned cmd, unsigned long arg) |
169 | { | 169 | { |
170 | struct disk_info *di = inode->i_bdev->bd_disk->private_data; | 170 | struct disk_info *di = bdev->bd_disk->private_data; |
171 | return cdrom_ioctl(&di->viocd_info, inode->i_bdev, | 171 | return cdrom_ioctl(&di->viocd_info, bdev, mode, cmd, arg); |
172 | file ? file->f_mode : 0, cmd, arg); | ||
173 | } | 172 | } |
174 | 173 | ||
175 | static int viocd_blk_media_changed(struct gendisk *disk) | 174 | static int viocd_blk_media_changed(struct gendisk *disk) |
@@ -180,9 +179,9 @@ static int viocd_blk_media_changed(struct gendisk *disk) | |||
180 | 179 | ||
181 | struct block_device_operations viocd_fops = { | 180 | struct block_device_operations viocd_fops = { |
182 | .owner = THIS_MODULE, | 181 | .owner = THIS_MODULE, |
183 | .__open = viocd_blk_open, | 182 | .open = viocd_blk_open, |
184 | .__release = viocd_blk_release, | 183 | .release = viocd_blk_release, |
185 | .__ioctl = viocd_blk_ioctl, | 184 | .locked_ioctl = viocd_blk_ioctl, |
186 | .media_changed = viocd_blk_media_changed, | 185 | .media_changed = viocd_blk_media_changed, |
187 | }; | 186 | }; |
188 | 187 | ||