diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/tape_block.c | 4 | ||||
-rw-r--r-- | drivers/s390/char/tape_core.c | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 5c65cf3e5cc0..b70d92690242 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -432,8 +432,8 @@ tapeblock_ioctl( | |||
432 | ) { | 432 | ) { |
433 | int rc; | 433 | int rc; |
434 | int minor; | 434 | int minor; |
435 | struct gendisk *disk = inode->i_bdev->bd_disk; | 435 | struct gendisk *disk; |
436 | struct tape_device *device = disk->private_data; | 436 | struct tape_device *device; |
437 | 437 | ||
438 | rc = 0; | 438 | rc = 0; |
439 | disk = inode->i_bdev->bd_disk; | 439 | disk = inode->i_bdev->bd_disk; |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 389ee2c0f443..e6e4086d3224 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -210,18 +210,14 @@ tape_state_set(struct tape_device *device, enum tape_state newstate) | |||
210 | return; | 210 | return; |
211 | } | 211 | } |
212 | DBF_EVENT(4, "ts. dev: %x\n", device->first_minor); | 212 | DBF_EVENT(4, "ts. dev: %x\n", device->first_minor); |
213 | if (device->tape_state < TO_SIZE && device->tape_state >= 0) | 213 | DBF_EVENT(4, "old ts:\t\n"); |
214 | str = tape_state_verbose[device->tape_state]; | 214 | if (device->tape_state < TS_SIZE && device->tape_state >=0 ) |
215 | else | ||
216 | str = "UNKNOWN TS"; | ||
217 | DBF_EVENT(4, "old ts: %s\n", str); | ||
218 | if (device->tape_state < TO_SIZE && device->tape_state >=0 ) | ||
219 | str = tape_state_verbose[device->tape_state]; | 215 | str = tape_state_verbose[device->tape_state]; |
220 | else | 216 | else |
221 | str = "UNKNOWN TS"; | 217 | str = "UNKNOWN TS"; |
222 | DBF_EVENT(4, "%s\n", str); | 218 | DBF_EVENT(4, "%s\n", str); |
223 | DBF_EVENT(4, "new ts:\t\n"); | 219 | DBF_EVENT(4, "new ts:\t\n"); |
224 | if (newstate < TO_SIZE && newstate >= 0) | 220 | if (newstate < TS_SIZE && newstate >= 0) |
225 | str = tape_state_verbose[newstate]; | 221 | str = tape_state_verbose[newstate]; |
226 | else | 222 | else |
227 | str = "UNKNOWN TS"; | 223 | str = "UNKNOWN TS"; |