diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 10:27:58 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:27 -0400 |
commit | a4600f81393d685043fe2d485cf2b123301f467d (patch) | |
tree | c5deaf107eb7bf4b9da3e863e0f4b99cca189e89 /drivers/ide | |
parent | b2f21e057dfbaa12acca1e79d9aeb3d9169d2e2e (diff) |
[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.c | 19 |
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 = { | |||
2340 | .release = idetape_chrdev_release, | 2340 | .release = idetape_chrdev_release, |
2341 | }; | 2341 | }; |
2342 | 2342 | ||
2343 | static int idetape_open(struct inode *inode, struct file *filp) | 2343 | static int idetape_open(struct block_device *bdev, fmode_t mode) |
2344 | { | 2344 | { |
2345 | struct gendisk *disk = inode->i_bdev->bd_disk; | 2345 | struct ide_tape_obj *tape = ide_tape_get(bdev->bd_disk); |
2346 | struct ide_tape_obj *tape; | ||
2347 | 2346 | ||
2348 | tape = ide_tape_get(disk); | ||
2349 | if (!tape) | 2347 | if (!tape) |
2350 | return -ENXIO; | 2348 | return -ENXIO; |
2351 | 2349 | ||
2352 | return 0; | 2350 | return 0; |
2353 | } | 2351 | } |
2354 | 2352 | ||
2355 | static int idetape_release(struct inode *inode, struct file *filp) | 2353 | static int idetape_release(struct gendisk *disk, fmode_t mode) |
2356 | { | 2354 | { |
2357 | struct gendisk *disk = inode->i_bdev->bd_disk; | ||
2358 | struct ide_tape_obj *tape = ide_drv_g(disk, ide_tape_obj); | 2355 | struct ide_tape_obj *tape = ide_drv_g(disk, ide_tape_obj); |
2359 | 2356 | ||
2360 | ide_tape_put(tape); | 2357 | ide_tape_put(tape); |
2361 | |||
2362 | return 0; | 2358 | return 0; |
2363 | } | 2359 | } |
2364 | 2360 | ||
2365 | static int idetape_ioctl(struct inode *inode, struct file *file, | 2361 | static int idetape_ioctl(struct block_device *bdev, fmode_t mode, |
2366 | unsigned int cmd, unsigned long arg) | 2362 | unsigned int cmd, unsigned long arg) |
2367 | { | 2363 | { |
2368 | struct block_device *bdev = inode->i_bdev; | ||
2369 | struct ide_tape_obj *tape = ide_drv_g(bdev->bd_disk, ide_tape_obj); | 2364 | struct ide_tape_obj *tape = ide_drv_g(bdev->bd_disk, ide_tape_obj); |
2370 | ide_drive_t *drive = tape->drive; | 2365 | ide_drive_t *drive = tape->drive; |
2371 | int err = generic_ide_ioctl(drive, bdev, cmd, arg); | 2366 | int err = generic_ide_ioctl(drive, bdev, cmd, arg); |
@@ -2376,9 +2371,9 @@ static int idetape_ioctl(struct inode *inode, struct file *file, | |||
2376 | 2371 | ||
2377 | static struct block_device_operations idetape_block_ops = { | 2372 | static struct block_device_operations idetape_block_ops = { |
2378 | .owner = THIS_MODULE, | 2373 | .owner = THIS_MODULE, |
2379 | .__open = idetape_open, | 2374 | .open = idetape_open, |
2380 | .__release = idetape_release, | 2375 | .release = idetape_release, |
2381 | .__ioctl = idetape_ioctl, | 2376 | .locked_ioctl = idetape_ioctl, |
2382 | }; | 2377 | }; |
2383 | 2378 | ||
2384 | static int ide_tape_probe(ide_drive_t *drive) | 2379 | static int ide_tape_probe(ide_drive_t *drive) |