[PATCH] s390: minor tape fixes
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Tue, 11 Apr 2006 05:53:49 +0000 (22:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:38 +0000 (06:18 -0700)
Cleanup of minor bugs found by a source code checker.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/s390/char/tape_block.c
drivers/s390/char/tape_core.c

index 5c65cf3e5cc02506261d3e970a267b346df0d20b..b70d926902424dd9943c8dbfbc1c8353a03b7804 100644 (file)
@@ -432,8 +432,8 @@ tapeblock_ioctl(
 ) {
        int rc;
        int minor;
-       struct gendisk *disk = inode->i_bdev->bd_disk;
-       struct tape_device *device = disk->private_data;
+       struct gendisk *disk;
+       struct tape_device *device;
 
        rc     = 0;
        disk   = inode->i_bdev->bd_disk;
index 389ee2c0f4435e9966c6ddc4d492e7217d611c11..e6e4086d3224bf077ff2025c53953a2b371c722b 100644 (file)
@@ -210,18 +210,14 @@ tape_state_set(struct tape_device *device, enum tape_state newstate)
                return;
        }
        DBF_EVENT(4, "ts. dev:  %x\n", device->first_minor);
-       if (device->tape_state < TO_SIZE && device->tape_state >= 0)
-               str = tape_state_verbose[device->tape_state];
-       else
-               str = "UNKNOWN TS";
-       DBF_EVENT(4, "old ts:   %s\n", str);
-       if (device->tape_state < TO_SIZE && device->tape_state >=0 )
+       DBF_EVENT(4, "old ts:\t\n");
+       if (device->tape_state < TS_SIZE && device->tape_state >=0 )
                str = tape_state_verbose[device->tape_state];
        else
                str = "UNKNOWN TS";
        DBF_EVENT(4, "%s\n", str);
        DBF_EVENT(4, "new ts:\t\n");
-       if (newstate < TO_SIZE && newstate >= 0)
+       if (newstate < TS_SIZE && newstate >= 0)
                str = tape_state_verbose[newstate];
        else
                str = "UNKNOWN TS";