diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 10:40:39 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:46 -0400 |
commit | 3e3c9c6f3d31ac6eca7ec59f28f3cbc2ee45ff6e (patch) | |
tree | d87f0454420fffe544b3974178829d54ddd13332 /drivers | |
parent | 4e999af9b25d30461ae54debce92803f1b064383 (diff) | |
download | op-kernel-dev-3e3c9c6f3d31ac6eca7ec59f28f3cbc2ee45ff6e.zip op-kernel-dev-3e3c9c6f3d31ac6eca7ec59f28f3cbc2ee45ff6e.tar.gz |
[PATCH] switch ide-scsi
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/ide-scsi.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 9069afb..2370fd8 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -452,40 +452,34 @@ static ide_driver_t idescsi_driver = { #endif }; -static int idescsi_ide_open(struct inode *inode, struct file *filp) +static int idescsi_ide_open(struct block_device *bdev, fmode_t mode) { - struct gendisk *disk = inode->i_bdev->bd_disk; - struct ide_scsi_obj *scsi; + struct ide_scsi_obj *scsi = ide_scsi_get(bdev->bd_disk); - if (!(scsi = ide_scsi_get(disk))) + if (!scsi) return -ENXIO; return 0; } -static int idescsi_ide_release(struct inode *inode, struct file *filp) +static int idescsi_ide_release(struct gendisk *disk, fmode_t mode) { - struct gendisk *disk = inode->i_bdev->bd_disk; - struct ide_scsi_obj *scsi = ide_scsi_g(disk); - - ide_scsi_put(scsi); - + ide_scsi_put(ide_scsi_g(disk)); return 0; } -static int idescsi_ide_ioctl(struct inode *inode, struct file *file, +static int idescsi_ide_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; struct ide_scsi_obj *scsi = ide_scsi_g(bdev->bd_disk); return generic_ide_ioctl(scsi->drive, bdev, cmd, arg); } static struct block_device_operations idescsi_ops = { .owner = THIS_MODULE, - .__open = idescsi_ide_open, - .__release = idescsi_ide_release, - .__ioctl = idescsi_ide_ioctl, + .open = idescsi_ide_open, + .release = idescsi_ide_release, + .locked_ioctl = idescsi_ide_ioctl, }; static int idescsi_slave_configure(struct scsi_device * sdp) |