diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
commit | 7a9787e1eba95a166265e6a260cf30af04ef0a99 (patch) | |
tree | e730a4565e0318140d2fbd2f0415d18a339d7336 /drivers/s390/char/tape_block.c | |
parent | 41b9eb264c8407655db57b60b4457fe1b2ec9977 (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) |
Merge commit 'v2.6.28-rc2' into x86/pci-ioapic-boot-irq-quirks
Diffstat (limited to 'drivers/s390/char/tape_block.c')
-rw-r--r-- | drivers/s390/char/tape_block.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 95da72bc17e8..023803dbb0c7 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -43,9 +43,9 @@ | |||
43 | /* | 43 | /* |
44 | * file operation structure for tape block frontend | 44 | * file operation structure for tape block frontend |
45 | */ | 45 | */ |
46 | static int tapeblock_open(struct inode *, struct file *); | 46 | static int tapeblock_open(struct block_device *, fmode_t); |
47 | static int tapeblock_release(struct inode *, struct file *); | 47 | static int tapeblock_release(struct gendisk *, fmode_t); |
48 | static int tapeblock_ioctl(struct inode *, struct file *, unsigned int, | 48 | static int tapeblock_ioctl(struct block_device *, fmode_t, unsigned int, |
49 | unsigned long); | 49 | unsigned long); |
50 | static int tapeblock_medium_changed(struct gendisk *); | 50 | static int tapeblock_medium_changed(struct gendisk *); |
51 | static int tapeblock_revalidate_disk(struct gendisk *); | 51 | static int tapeblock_revalidate_disk(struct gendisk *); |
@@ -54,7 +54,7 @@ static struct block_device_operations tapeblock_fops = { | |||
54 | .owner = THIS_MODULE, | 54 | .owner = THIS_MODULE, |
55 | .open = tapeblock_open, | 55 | .open = tapeblock_open, |
56 | .release = tapeblock_release, | 56 | .release = tapeblock_release, |
57 | .ioctl = tapeblock_ioctl, | 57 | .locked_ioctl = tapeblock_ioctl, |
58 | .media_changed = tapeblock_medium_changed, | 58 | .media_changed = tapeblock_medium_changed, |
59 | .revalidate_disk = tapeblock_revalidate_disk, | 59 | .revalidate_disk = tapeblock_revalidate_disk, |
60 | }; | 60 | }; |
@@ -278,7 +278,7 @@ tapeblock_cleanup_device(struct tape_device *device) | |||
278 | 278 | ||
279 | if (!device->blk_data.disk) { | 279 | if (!device->blk_data.disk) { |
280 | PRINT_ERR("(%s): No gendisk to clean up!\n", | 280 | PRINT_ERR("(%s): No gendisk to clean up!\n", |
281 | device->cdev->dev.bus_id); | 281 | dev_name(&device->cdev->dev)); |
282 | goto cleanup_queue; | 282 | goto cleanup_queue; |
283 | } | 283 | } |
284 | 284 | ||
@@ -364,13 +364,12 @@ tapeblock_medium_changed(struct gendisk *disk) | |||
364 | * Block frontend tape device open function. | 364 | * Block frontend tape device open function. |
365 | */ | 365 | */ |
366 | static int | 366 | static int |
367 | tapeblock_open(struct inode *inode, struct file *filp) | 367 | tapeblock_open(struct block_device *bdev, fmode_t mode) |
368 | { | 368 | { |
369 | struct gendisk * disk; | 369 | struct gendisk * disk = bdev->bd_disk; |
370 | struct tape_device * device; | 370 | struct tape_device * device; |
371 | int rc; | 371 | int rc; |
372 | 372 | ||
373 | disk = inode->i_bdev->bd_disk; | ||
374 | device = tape_get_device_reference(disk->private_data); | 373 | device = tape_get_device_reference(disk->private_data); |
375 | 374 | ||
376 | if (device->required_tapemarks) { | 375 | if (device->required_tapemarks) { |
@@ -410,9 +409,8 @@ release: | |||
410 | * we just get the pointer here and release the reference. | 409 | * we just get the pointer here and release the reference. |
411 | */ | 410 | */ |
412 | static int | 411 | static int |
413 | tapeblock_release(struct inode *inode, struct file *filp) | 412 | tapeblock_release(struct gendisk *disk, fmode_t mode) |
414 | { | 413 | { |
415 | struct gendisk *disk = inode->i_bdev->bd_disk; | ||
416 | struct tape_device *device = disk->private_data; | 414 | struct tape_device *device = disk->private_data; |
417 | 415 | ||
418 | tape_state_set(device, TS_IN_USE); | 416 | tape_state_set(device, TS_IN_USE); |
@@ -427,22 +425,21 @@ tapeblock_release(struct inode *inode, struct file *filp) | |||
427 | */ | 425 | */ |
428 | static int | 426 | static int |
429 | tapeblock_ioctl( | 427 | tapeblock_ioctl( |
430 | struct inode * inode, | 428 | struct block_device * bdev, |
431 | struct file * file, | 429 | fmode_t mode, |
432 | unsigned int command, | 430 | unsigned int command, |
433 | unsigned long arg | 431 | unsigned long arg |
434 | ) { | 432 | ) { |
435 | int rc; | 433 | int rc; |
436 | int minor; | 434 | int minor; |
437 | struct gendisk *disk; | 435 | struct gendisk *disk = bdev->bd_disk; |
438 | struct tape_device *device; | 436 | struct tape_device *device; |
439 | 437 | ||
440 | rc = 0; | 438 | rc = 0; |
441 | disk = inode->i_bdev->bd_disk; | ||
442 | BUG_ON(!disk); | 439 | BUG_ON(!disk); |
443 | device = disk->private_data; | 440 | device = disk->private_data; |
444 | BUG_ON(!device); | 441 | BUG_ON(!device); |
445 | minor = iminor(inode); | 442 | minor = MINOR(bdev->bd_dev); |
446 | 443 | ||
447 | DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command); | 444 | DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command); |
448 | DBF_LH(6, "device = %d:%d\n", tapeblock_major, minor); | 445 | DBF_LH(6, "device = %d:%d\n", tapeblock_major, minor); |