Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/tape: remove unsupported PM functions

The power-management related functions are unused since
'commit 394216275c7d ("s390: remove broken hibernate / power
management support")'. Remove them from tape drivers.

Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Vineeth Vijayan and committed by
Heiko Carstens
2f6ea6fb 6b532eec

-53
-1
drivers/s390/char/tape.h
··· 264 264 265 265 extern int tape_generic_online(struct tape_device *, struct tape_discipline *); 266 266 extern int tape_generic_offline(struct ccw_device *); 267 - extern int tape_generic_pm_suspend(struct ccw_device *); 268 267 269 268 /* Externals from tape_devmap.c */ 270 269 extern int tape_generic_probe(struct ccw_device *);
-1
drivers/s390/char/tape_34xx.c
··· 1191 1191 .remove = tape_generic_remove, 1192 1192 .set_online = tape_34xx_online, 1193 1193 .set_offline = tape_generic_offline, 1194 - .freeze = tape_generic_pm_suspend, 1195 1194 .int_class = IRQIO_TAP, 1196 1195 }; 1197 1196
-1
drivers/s390/char/tape_3590.c
··· 1651 1651 .remove = tape_generic_remove, 1652 1652 .set_offline = tape_generic_offline, 1653 1653 .set_online = tape_3590_online, 1654 - .freeze = tape_generic_pm_suspend, 1655 1654 .int_class = IRQIO_TAP, 1656 1655 }; 1657 1656
-50
drivers/s390/char/tape_core.c
··· 428 428 } 429 429 430 430 /* 431 - * Suspend device. 432 - * 433 - * Called by the common I/O layer if the drive should be suspended on user 434 - * request. We refuse to suspend if the device is loaded or in use for the 435 - * following reason: 436 - * While the Linux guest is suspended, it might be logged off which causes 437 - * devices to be detached. Tape devices are automatically rewound and unloaded 438 - * during DETACH processing (unless the tape device was attached with the 439 - * NOASSIGN or MULTIUSER option). After rewind/unload, there is no way to 440 - * resume the original state of the tape device, since we would need to 441 - * manually re-load the cartridge which was active at suspend time. 442 - */ 443 - int tape_generic_pm_suspend(struct ccw_device *cdev) 444 - { 445 - struct tape_device *device; 446 - 447 - device = dev_get_drvdata(&cdev->dev); 448 - if (!device) { 449 - return -ENODEV; 450 - } 451 - 452 - DBF_LH(3, "(%08x): tape_generic_pm_suspend(%p)\n", 453 - device->cdev_id, device); 454 - 455 - if (device->medium_state != MS_UNLOADED) { 456 - pr_err("A cartridge is loaded in tape device %s, " 457 - "refusing to suspend\n", dev_name(&cdev->dev)); 458 - return -EBUSY; 459 - } 460 - 461 - spin_lock_irq(get_ccwdev_lock(device->cdev)); 462 - switch (device->tape_state) { 463 - case TS_INIT: 464 - case TS_NOT_OPER: 465 - case TS_UNUSED: 466 - spin_unlock_irq(get_ccwdev_lock(device->cdev)); 467 - break; 468 - default: 469 - pr_err("Tape device %s is busy, refusing to " 470 - "suspend\n", dev_name(&cdev->dev)); 471 - spin_unlock_irq(get_ccwdev_lock(device->cdev)); 472 - return -EBUSY; 473 - } 474 - 475 - DBF_LH(3, "(%08x): Drive suspended.\n", device->cdev_id); 476 - return 0; 477 - } 478 - 479 - /* 480 431 * Set device offline. 481 432 * 482 433 * Called by the common I/O layer if the drive should set offline on user ··· 1311 1360 EXPORT_SYMBOL(tape_generic_probe); 1312 1361 EXPORT_SYMBOL(tape_generic_online); 1313 1362 EXPORT_SYMBOL(tape_generic_offline); 1314 - EXPORT_SYMBOL(tape_generic_pm_suspend); 1315 1363 EXPORT_SYMBOL(tape_put_device); 1316 1364 EXPORT_SYMBOL(tape_get_device); 1317 1365 EXPORT_SYMBOL(tape_state_verbose);