s390/tape: remove unsupported PM functions
authorVineeth Vijayan <vneethv@linux.ibm.com>
Mon, 28 Sep 2020 19:28:20 +0000 (21:28 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 2 Dec 2020 17:19:24 +0000 (18:19 +0100)
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>
drivers/s390/char/tape.h
drivers/s390/char/tape_34xx.c
drivers/s390/char/tape_3590.c
drivers/s390/char/tape_core.c

index e2c60475dfa8970ade35e1ec5f2601196b8aa9d0..4e5d5efa978f26f014c2913c02506576b00512c1 100644 (file)
@@ -264,7 +264,6 @@ extern void tape_state_set(struct tape_device *, enum tape_state);
 
 extern int tape_generic_online(struct tape_device *, struct tape_discipline *);
 extern int tape_generic_offline(struct ccw_device *);
-extern int tape_generic_pm_suspend(struct ccw_device *);
 
 /* Externals from tape_devmap.c */
 extern int tape_generic_probe(struct ccw_device *);
index 6d73ee3f827a6ca401b0eaa5e4f66b2e6e1766e5..7ada994d459256612595c4fd96d03c268f8ea96f 100644 (file)
@@ -1191,7 +1191,6 @@ static struct ccw_driver tape_34xx_driver = {
        .remove = tape_generic_remove,
        .set_online = tape_34xx_online,
        .set_offline = tape_generic_offline,
-       .freeze = tape_generic_pm_suspend,
        .int_class = IRQIO_TAP,
 };
 
index 4554cdf4d6bdea8a1b5417c96c5a247c11fff14a..ecf8c5006a0ef808ac7a4e215048b43da1fbe905 100644 (file)
@@ -1651,7 +1651,6 @@ static struct ccw_driver tape_3590_driver = {
        .remove = tape_generic_remove,
        .set_offline = tape_generic_offline,
        .set_online = tape_3590_online,
-       .freeze = tape_generic_pm_suspend,
        .int_class = IRQIO_TAP,
 };
 
index 380e6a67719cde066e0f854dc7845199d46cb98c..a6d2a4792185096f833f2b1eba79eb705a7561bc 100644 (file)
@@ -427,55 +427,6 @@ tape_cleanup_device(struct tape_device *device)
        tape_med_state_set(device, MS_UNKNOWN);
 }
 
-/*
- * Suspend device.
- *
- * Called by the common I/O layer if the drive should be suspended on user
- * request. We refuse to suspend if the device is loaded or in use for the
- * following reason:
- * While the Linux guest is suspended, it might be logged off which causes
- * devices to be detached. Tape devices are automatically rewound and unloaded
- * during DETACH processing (unless the tape device was attached with the
- * NOASSIGN or MULTIUSER option). After rewind/unload, there is no way to
- * resume the original state of the tape device, since we would need to
- * manually re-load the cartridge which was active at suspend time.
- */
-int tape_generic_pm_suspend(struct ccw_device *cdev)
-{
-       struct tape_device *device;
-
-       device = dev_get_drvdata(&cdev->dev);
-       if (!device) {
-               return -ENODEV;
-       }
-
-       DBF_LH(3, "(%08x): tape_generic_pm_suspend(%p)\n",
-               device->cdev_id, device);
-
-       if (device->medium_state != MS_UNLOADED) {
-               pr_err("A cartridge is loaded in tape device %s, "
-                      "refusing to suspend\n", dev_name(&cdev->dev));
-               return -EBUSY;
-       }
-
-       spin_lock_irq(get_ccwdev_lock(device->cdev));
-       switch (device->tape_state) {
-               case TS_INIT:
-               case TS_NOT_OPER:
-               case TS_UNUSED:
-                       spin_unlock_irq(get_ccwdev_lock(device->cdev));
-                       break;
-               default:
-                       pr_err("Tape device %s is busy, refusing to "
-                              "suspend\n", dev_name(&cdev->dev));
-                       spin_unlock_irq(get_ccwdev_lock(device->cdev));
-                       return -EBUSY;
-       }
-
-       DBF_LH(3, "(%08x): Drive suspended.\n", device->cdev_id);
-       return 0;
-}
-
 /*
  * Set device offline.
  *
@@ -1360,7 +1311,6 @@ EXPORT_SYMBOL(tape_generic_remove);
 EXPORT_SYMBOL(tape_generic_probe);
 EXPORT_SYMBOL(tape_generic_online);
 EXPORT_SYMBOL(tape_generic_offline);
-EXPORT_SYMBOL(tape_generic_pm_suspend);
 EXPORT_SYMBOL(tape_put_device);
 EXPORT_SYMBOL(tape_get_device);
 EXPORT_SYMBOL(tape_state_verbose);