diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-10-07 17:54:28 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:22 -0400 |
commit | bbc1cc978404105da23d505163ce9fd5598ed5b1 (patch) | |
tree | cd0e1dfba91288338784dac3f9356aeadb3e713e /drivers/block | |
parent | 08f85851215100d0eebf026810955ee6ad456c38 (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/block')
-rw-r--r-- | drivers/block/paride/pcd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index b8a994a2b013..8bd557e2a659 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
@@ -226,20 +226,22 @@ static int pcd_warned; /* Have we logged a phase warning ? */ | |||
226 | static int pcd_block_open(struct inode *inode, struct file *file) | 226 | static int pcd_block_open(struct inode *inode, struct file *file) |
227 | { | 227 | { |
228 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; | 228 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; |
229 | return cdrom_open(&cd->info, inode, file); | 229 | return cdrom_open(&cd->info, inode->i_bdev, file->f_mode); |
230 | } | 230 | } |
231 | 231 | ||
232 | static int pcd_block_release(struct inode *inode, struct file *file) | 232 | static int pcd_block_release(struct inode *inode, struct file *file) |
233 | { | 233 | { |
234 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; | 234 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; |
235 | return cdrom_release(&cd->info, file); | 235 | cdrom_release(&cd->info, file ? file->f_mode : 0); |
236 | return 0; | ||
236 | } | 237 | } |
237 | 238 | ||
238 | static int pcd_block_ioctl(struct inode *inode, struct file *file, | 239 | static int pcd_block_ioctl(struct inode *inode, struct file *file, |
239 | unsigned cmd, unsigned long arg) | 240 | unsigned cmd, unsigned long arg) |
240 | { | 241 | { |
241 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; | 242 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; |
242 | return cdrom_ioctl(file, &cd->info, inode, cmd, arg); | 243 | return cdrom_ioctl(&cd->info, inode->i_bdev, |
244 | file ? file->f_mode : 0, cmd, arg); | ||
243 | } | 245 | } |
244 | 246 | ||
245 | static int pcd_block_media_changed(struct gendisk *disk) | 247 | static int pcd_block_media_changed(struct gendisk *disk) |