aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:23:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:23:07 -0400
commit22484856402bfa1ff3defe47f6029ab0418240d9 (patch)
tree140c67bf59674da350a7b51765d6ff7eb101b597 /drivers/scsi/ide-scsi.c
parent5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (diff)
parent56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (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.c22
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
455static int idescsi_ide_open(struct inode *inode, struct file *filp) 455static 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
466static int idescsi_ide_release(struct inode *inode, struct file *filp) 465static 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
476static int idescsi_ide_ioctl(struct inode *inode, struct file *file, 471static 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
484static struct block_device_operations idescsi_ops = { 478static 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
491static int idescsi_slave_configure(struct scsi_device * sdp) 485static int idescsi_slave_configure(struct scsi_device * sdp)