diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 10:25:18 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:19 -0400 |
commit | 8389feb4a8b9c29836c320e51677bd4650713fa8 (patch) | |
tree | 13e8c10f16a0c393c7a09234a905b1bbc1eeb6f0 /drivers | |
parent | ab746cb9386313201f2e0060e85a30781047dee1 (diff) |
[PATCH] switch gdrom
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cdrom/gdrom.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index ab0c637f58be..9aaa86b232b1 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
@@ -490,14 +490,14 @@ static struct cdrom_device_ops gdrom_ops = { | |||
490 | .n_minors = 1, | 490 | .n_minors = 1, |
491 | }; | 491 | }; |
492 | 492 | ||
493 | static int gdrom_bdops_open(struct inode *inode, struct file *file) | 493 | static int gdrom_bdops_open(struct block_device *bdev, fmode_t mode) |
494 | { | 494 | { |
495 | return cdrom_open(gd.cd_info, inode->i_bdev, file->f_mode); | 495 | return cdrom_open(gd.cd_info, bdev, mode); |
496 | } | 496 | } |
497 | 497 | ||
498 | static int gdrom_bdops_release(struct inode *inode, struct file *file) | 498 | static int gdrom_bdops_release(struct block_device *bdev, fmode_t mode) |
499 | { | 499 | { |
500 | return cdrom_release(gd.cd_info, file ? file->f_mode : 0); | 500 | return cdrom_release(gd.cd_info, mode); |
501 | } | 501 | } |
502 | 502 | ||
503 | static int gdrom_bdops_mediachanged(struct gendisk *disk) | 503 | static int gdrom_bdops_mediachanged(struct gendisk *disk) |
@@ -505,19 +505,18 @@ static int gdrom_bdops_mediachanged(struct gendisk *disk) | |||
505 | return cdrom_media_changed(gd.cd_info); | 505 | return cdrom_media_changed(gd.cd_info); |
506 | } | 506 | } |
507 | 507 | ||
508 | static int gdrom_bdops_ioctl(struct inode *inode, struct file *file, | 508 | static int gdrom_bdops_ioctl(struct block_device *bdev, fmode_t mode, |
509 | unsigned cmd, unsigned long arg) | 509 | unsigned cmd, unsigned long arg) |
510 | { | 510 | { |
511 | return cdrom_ioctl(gd.cd_info, inode->i_bdev, | 511 | return cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg); |
512 | file ? file->f_mode : 0, cmd, arg); | ||
513 | } | 512 | } |
514 | 513 | ||
515 | static struct block_device_operations gdrom_bdops = { | 514 | static struct block_device_operations gdrom_bdops = { |
516 | .owner = THIS_MODULE, | 515 | .owner = THIS_MODULE, |
517 | .__open = gdrom_bdops_open, | 516 | .open = gdrom_bdops_open, |
518 | .__release = gdrom_bdops_release, | 517 | .release = gdrom_bdops_release, |
519 | .media_changed = gdrom_bdops_mediachanged, | 518 | .media_changed = gdrom_bdops_mediachanged, |
520 | .__ioctl = gdrom_bdops_ioctl, | 519 | .locked_ioctl = gdrom_bdops_ioctl, |
521 | }; | 520 | }; |
522 | 521 | ||
523 | static irqreturn_t gdrom_command_interrupt(int irq, void *dev_id) | 522 | static irqreturn_t gdrom_command_interrupt(int irq, void *dev_id) |