diff options
Diffstat (limited to 'drivers/block/paride/pf.c')
-rw-r--r-- | drivers/block/paride/pf.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index e7fe6ca97dd8..bef3b997ba3e 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c | |||
@@ -201,13 +201,13 @@ module_param_array(drive3, int, NULL, 0); | |||
201 | #define ATAPI_READ_10 0x28 | 201 | #define ATAPI_READ_10 0x28 |
202 | #define ATAPI_WRITE_10 0x2a | 202 | #define ATAPI_WRITE_10 0x2a |
203 | 203 | ||
204 | static int pf_open(struct inode *inode, struct file *file); | 204 | static int pf_open(struct block_device *bdev, fmode_t mode); |
205 | static void do_pf_request(struct request_queue * q); | 205 | static void do_pf_request(struct request_queue * q); |
206 | static int pf_ioctl(struct inode *inode, struct file *file, | 206 | static int pf_ioctl(struct block_device *bdev, fmode_t mode, |
207 | unsigned int cmd, unsigned long arg); | 207 | unsigned int cmd, unsigned long arg); |
208 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 208 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
209 | 209 | ||
210 | static int pf_release(struct inode *inode, struct file *file); | 210 | static int pf_release(struct gendisk *disk, fmode_t mode); |
211 | 211 | ||
212 | static int pf_detect(void); | 212 | static int pf_detect(void); |
213 | static void do_pf_read(void); | 213 | static void do_pf_read(void); |
@@ -266,7 +266,7 @@ static struct block_device_operations pf_fops = { | |||
266 | .owner = THIS_MODULE, | 266 | .owner = THIS_MODULE, |
267 | .open = pf_open, | 267 | .open = pf_open, |
268 | .release = pf_release, | 268 | .release = pf_release, |
269 | .ioctl = pf_ioctl, | 269 | .locked_ioctl = pf_ioctl, |
270 | .getgeo = pf_getgeo, | 270 | .getgeo = pf_getgeo, |
271 | .media_changed = pf_check_media, | 271 | .media_changed = pf_check_media, |
272 | }; | 272 | }; |
@@ -296,16 +296,16 @@ static void __init pf_init_units(void) | |||
296 | } | 296 | } |
297 | } | 297 | } |
298 | 298 | ||
299 | static int pf_open(struct inode *inode, struct file *file) | 299 | static int pf_open(struct block_device *bdev, fmode_t mode) |
300 | { | 300 | { |
301 | struct pf_unit *pf = inode->i_bdev->bd_disk->private_data; | 301 | struct pf_unit *pf = bdev->bd_disk->private_data; |
302 | 302 | ||
303 | pf_identify(pf); | 303 | pf_identify(pf); |
304 | 304 | ||
305 | if (pf->media_status == PF_NM) | 305 | if (pf->media_status == PF_NM) |
306 | return -ENODEV; | 306 | return -ENODEV; |
307 | 307 | ||
308 | if ((pf->media_status == PF_RO) && (file->f_mode & 2)) | 308 | if ((pf->media_status == PF_RO) && (mode & FMODE_WRITE)) |
309 | return -EROFS; | 309 | return -EROFS; |
310 | 310 | ||
311 | pf->access++; | 311 | pf->access++; |
@@ -333,9 +333,9 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
333 | return 0; | 333 | return 0; |
334 | } | 334 | } |
335 | 335 | ||
336 | static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) | 336 | static int pf_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) |
337 | { | 337 | { |
338 | struct pf_unit *pf = inode->i_bdev->bd_disk->private_data; | 338 | struct pf_unit *pf = bdev->bd_disk->private_data; |
339 | 339 | ||
340 | if (cmd != CDROMEJECT) | 340 | if (cmd != CDROMEJECT) |
341 | return -EINVAL; | 341 | return -EINVAL; |
@@ -346,9 +346,9 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un | |||
346 | return 0; | 346 | return 0; |
347 | } | 347 | } |
348 | 348 | ||
349 | static int pf_release(struct inode *inode, struct file *file) | 349 | static int pf_release(struct gendisk *disk, fmode_t mode) |
350 | { | 350 | { |
351 | struct pf_unit *pf = inode->i_bdev->bd_disk->private_data; | 351 | struct pf_unit *pf = disk->private_data; |
352 | 352 | ||
353 | if (pf->access <= 0) | 353 | if (pf->access <= 0) |
354 | return -EINVAL; | 354 | return -EINVAL; |