summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 10:27:58 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:27 -0400
commita4600f81393d685043fe2d485cf2b123301f467d (patch)
treec5deaf107eb7bf4b9da3e863e0f4b99cca189e89 /drivers/ide
parentb2f21e057dfbaa12acca1e79d9aeb3d9169d2e2e (diff)
downloadlinux-a4600f81393d685043fe2d485cf2b123301f467d.tar.bz2
[PATCH] switch ide-tape
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-tape.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index c5df53c4838c..a2d470eb2b55 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2340,32 +2340,27 @@ static const struct file_operations idetape_fops = {
.release = idetape_chrdev_release,
};
-static int idetape_open(struct inode *inode, struct file *filp)
+static int idetape_open(struct block_device *bdev, fmode_t mode)
{
- struct gendisk *disk = inode->i_bdev->bd_disk;
- struct ide_tape_obj *tape;
+ struct ide_tape_obj *tape = ide_tape_get(bdev->bd_disk);
- tape = ide_tape_get(disk);
if (!tape)
return -ENXIO;
return 0;
}
-static int idetape_release(struct inode *inode, struct file *filp)
+static int idetape_release(struct gendisk *disk, fmode_t mode)
{
- struct gendisk *disk = inode->i_bdev->bd_disk;
struct ide_tape_obj *tape = ide_drv_g(disk, ide_tape_obj);
ide_tape_put(tape);
-
return 0;
}
-static int idetape_ioctl(struct inode *inode, struct file *file,
+static int idetape_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
- struct block_device *bdev = inode->i_bdev;
struct ide_tape_obj *tape = ide_drv_g(bdev->bd_disk, ide_tape_obj);
ide_drive_t *drive = tape->drive;
int err = generic_ide_ioctl(drive, bdev, cmd, arg);
@@ -2376,9 +2371,9 @@ static int idetape_ioctl(struct inode *inode, struct file *file,
static struct block_device_operations idetape_block_ops = {
.owner = THIS_MODULE,
- .__open = idetape_open,
- .__release = idetape_release,
- .__ioctl = idetape_ioctl,
+ .open = idetape_open,
+ .release = idetape_release,
+ .locked_ioctl = idetape_ioctl,
};
static int ide_tape_probe(ide_drive_t *drive)