diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 09:35:06 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:55 -0400 |
commit | c9acf903e0312dcac3a135c37303adc15e6162a9 (patch) | |
tree | 84f555daac3da13568016e9aff4cf92c320a443b | |
parent | a8cdc308c0ca3809e37e2be62174906a45b92670 (diff) |
[PATCH] switch pcd
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/block/paride/pcd.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index 6e6dcc1d4328..e91d4b4b014f 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
@@ -223,25 +223,24 @@ static int pcd_warned; /* Have we logged a phase warning ? */ | |||
223 | 223 | ||
224 | /* kernel glue structures */ | 224 | /* kernel glue structures */ |
225 | 225 | ||
226 | static int pcd_block_open(struct inode *inode, struct file *file) | 226 | static int pcd_block_open(struct block_device *bdev, fmode_t mode) |
227 | { | 227 | { |
228 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; | 228 | struct pcd_unit *cd = bdev->bd_disk->private_data; |
229 | return cdrom_open(&cd->info, inode->i_bdev, file->f_mode); | 229 | return cdrom_open(&cd->info, bdev, mode); |
230 | } | 230 | } |
231 | 231 | ||
232 | static int pcd_block_release(struct inode *inode, struct file *file) | 232 | static int pcd_block_release(struct gendisk *disk, fmode_t mode) |
233 | { | 233 | { |
234 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; | 234 | struct pcd_unit *cd = disk->private_data; |
235 | cdrom_release(&cd->info, file ? file->f_mode : 0); | 235 | cdrom_release(&cd->info, mode); |
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | static int pcd_block_ioctl(struct inode *inode, struct file *file, | 239 | static int pcd_block_ioctl(struct block_device *bdev, fmode_t mode, |
240 | unsigned cmd, unsigned long arg) | 240 | unsigned cmd, unsigned long arg) |
241 | { | 241 | { |
242 | struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; | 242 | struct pcd_unit *cd = bdev->bd_disk->private_data; |
243 | return cdrom_ioctl(&cd->info, inode->i_bdev, | 243 | return cdrom_ioctl(&cd->info, bdev, mode, cmd, arg); |
244 | file ? file->f_mode : 0, cmd, arg); | ||
245 | } | 244 | } |
246 | 245 | ||
247 | static int pcd_block_media_changed(struct gendisk *disk) | 246 | static int pcd_block_media_changed(struct gendisk *disk) |
@@ -252,9 +251,9 @@ static int pcd_block_media_changed(struct gendisk *disk) | |||
252 | 251 | ||
253 | static struct block_device_operations pcd_bdops = { | 252 | static struct block_device_operations pcd_bdops = { |
254 | .owner = THIS_MODULE, | 253 | .owner = THIS_MODULE, |
255 | .__open = pcd_block_open, | 254 | .open = pcd_block_open, |
256 | .__release = pcd_block_release, | 255 | .release = pcd_block_release, |
257 | .__ioctl = pcd_block_ioctl, | 256 | .locked_ioctl = pcd_block_ioctl, |
258 | .media_changed = pcd_block_media_changed, | 257 | .media_changed = pcd_block_media_changed, |
259 | }; | 258 | }; |
260 | 259 | ||