aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 10:40:39 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:46 -0400
commit3e3c9c6f3d31ac6eca7ec59f28f3cbc2ee45ff6e (patch)
treed87f0454420fffe544b3974178829d54ddd13332 /drivers/scsi
parent4e999af9b25d30461ae54debce92803f1b064383 (diff)
[PATCH] switch ide-scsi
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ide-scsi.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 9069afbad9d3..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, 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)