diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
commit | 22484856402bfa1ff3defe47f6029ab0418240d9 (patch) | |
tree | 140c67bf59674da350a7b51765d6ff7eb101b597 /drivers/scsi/ide-scsi.c | |
parent | 5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (diff) | |
parent | 56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits)
[PATCH] kill the rest of struct file propagation in block ioctls
[PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET
[PATCH] get rid of blkdev_locked_ioctl()
[PATCH] get rid of blkdev_driver_ioctl()
[PATCH] sanitize blkdev_get() and friends
[PATCH] remember mode of reiserfs journal
[PATCH] propagate mode through swsusp_close()
[PATCH] propagate mode through open_bdev_excl/close_bdev_excl
[PATCH] pass fmode_t to blkdev_put()
[PATCH] kill the unused bsize on the send side of /dev/loop
[PATCH] trim file propagation in block/compat_ioctl.c
[PATCH] end of methods switch: remove the old ones
[PATCH] switch sr
[PATCH] switch sd
[PATCH] switch ide-scsi
[PATCH] switch tape_block
[PATCH] switch dcssblk
[PATCH] switch dasd
[PATCH] switch mtd_blkdevs
[PATCH] switch mmc
...
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r-- | drivers/scsi/ide-scsi.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index afc96e844a25..2370fd82ebfe 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -452,40 +452,34 @@ static ide_driver_t idescsi_driver = { | |||
452 | #endif | 452 | #endif |
453 | }; | 453 | }; |
454 | 454 | ||
455 | static int idescsi_ide_open(struct inode *inode, struct file *filp) | 455 | static int idescsi_ide_open(struct block_device *bdev, fmode_t mode) |
456 | { | 456 | { |
457 | struct gendisk *disk = inode->i_bdev->bd_disk; | 457 | struct ide_scsi_obj *scsi = ide_scsi_get(bdev->bd_disk); |
458 | struct ide_scsi_obj *scsi; | ||
459 | 458 | ||
460 | if (!(scsi = ide_scsi_get(disk))) | 459 | if (!scsi) |
461 | return -ENXIO; | 460 | return -ENXIO; |
462 | 461 | ||
463 | return 0; | 462 | return 0; |
464 | } | 463 | } |
465 | 464 | ||
466 | static int idescsi_ide_release(struct inode *inode, struct file *filp) | 465 | static int idescsi_ide_release(struct gendisk *disk, fmode_t mode) |
467 | { | 466 | { |
468 | struct gendisk *disk = inode->i_bdev->bd_disk; | 467 | ide_scsi_put(ide_scsi_g(disk)); |
469 | struct ide_scsi_obj *scsi = ide_scsi_g(disk); | ||
470 | |||
471 | ide_scsi_put(scsi); | ||
472 | |||
473 | return 0; | 468 | return 0; |
474 | } | 469 | } |
475 | 470 | ||
476 | static int idescsi_ide_ioctl(struct inode *inode, struct file *file, | 471 | static int idescsi_ide_ioctl(struct block_device *bdev, fmode_t mode, |
477 | unsigned int cmd, unsigned long arg) | 472 | unsigned int cmd, unsigned long arg) |
478 | { | 473 | { |
479 | struct block_device *bdev = inode->i_bdev; | ||
480 | struct ide_scsi_obj *scsi = ide_scsi_g(bdev->bd_disk); | 474 | struct ide_scsi_obj *scsi = ide_scsi_g(bdev->bd_disk); |
481 | return generic_ide_ioctl(scsi->drive, file, bdev, cmd, arg); | 475 | return generic_ide_ioctl(scsi->drive, bdev, cmd, arg); |
482 | } | 476 | } |
483 | 477 | ||
484 | static struct block_device_operations idescsi_ops = { | 478 | static struct block_device_operations idescsi_ops = { |
485 | .owner = THIS_MODULE, | 479 | .owner = THIS_MODULE, |
486 | .open = idescsi_ide_open, | 480 | .open = idescsi_ide_open, |
487 | .release = idescsi_ide_release, | 481 | .release = idescsi_ide_release, |
488 | .ioctl = idescsi_ide_ioctl, | 482 | .locked_ioctl = idescsi_ide_ioctl, |
489 | }; | 483 | }; |
490 | 484 | ||
491 | static int idescsi_slave_configure(struct scsi_device * sdp) | 485 | static int idescsi_slave_configure(struct scsi_device * sdp) |