s390/hvc_iucv: Remove power management support
authorJulian Wiedmann <jwi@linux.ibm.com>
Mon, 14 Jun 2021 07:14:27 +0000 (09:14 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 18 Jun 2021 14:41:22 +0000 (16:41 +0200)
Power management support was removed for s390 with
commit 394216275c7d ("s390: remove broken hibernate / power management
support").

Remove the hvc_iucv_driver, but keep the device struct around so that
it can continue to provide the hvc_iucv_dev_attr_groups attributes.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/tty/hvc/hvc_iucv.c

index 2af1e57..297fa7b 100644 (file)
@@ -966,37 +966,6 @@ static void hvc_iucv_msg_complete(struct iucv_path *path,
        destroy_tty_buffer_list(&list_remove);
 }
 
-/**
- * hvc_iucv_pm_freeze() - Freeze PM callback
- * @dev:       IUVC HVC terminal device
- *
- * Sever an established IUCV communication path and
- * trigger a hang-up of the underlying HVC terminal.
- */
-static int hvc_iucv_pm_freeze(struct device *dev)
-{
-       struct hvc_iucv_private *priv = dev_get_drvdata(dev);
-
-       local_bh_disable();
-       hvc_iucv_hangup(priv);
-       local_bh_enable();
-
-       return 0;
-}
-
-/**
- * hvc_iucv_pm_restore_thaw() - Thaw and restore PM callback
- * @dev:       IUVC HVC terminal device
- *
- * Wake up the HVC thread to trigger hang-up and respective
- * HVC back-end notifier invocations.
- */
-static int hvc_iucv_pm_restore_thaw(struct device *dev)
-{
-       hvc_kick();
-       return 0;
-}
-
 static ssize_t hvc_iucv_dev_termid_show(struct device *dev,
                                        struct device_attribute *attr,
                                        char *buf)
@@ -1051,20 +1020,6 @@ static const struct hv_ops hvc_iucv_ops = {
        .dtr_rts = hvc_iucv_dtr_rts,
 };
 
-/* Suspend / resume device operations */
-static const struct dev_pm_ops hvc_iucv_pm_ops = {
-       .freeze   = hvc_iucv_pm_freeze,
-       .thaw     = hvc_iucv_pm_restore_thaw,
-       .restore  = hvc_iucv_pm_restore_thaw,
-};
-
-/* IUCV HVC device driver */
-static struct device_driver hvc_iucv_driver = {
-       .name = KMSG_COMPONENT,
-       .bus  = &iucv_bus,
-       .pm   = &hvc_iucv_pm_ops,
-};
-
 /* IUCV HVC device attributes */
 static DEVICE_ATTR(termid, 0640, hvc_iucv_dev_termid_show, NULL);
 static DEVICE_ATTR(state, 0640, hvc_iucv_dev_state_show, NULL);
@@ -1144,7 +1099,6 @@ static int __init hvc_iucv_alloc(int id, unsigned int is_console)
        dev_set_drvdata(priv->dev, priv);
        priv->dev->bus = &iucv_bus;
        priv->dev->parent = iucv_root;
-       priv->dev->driver = &hvc_iucv_driver;
        priv->dev->groups = hvc_iucv_dev_attr_groups;
        priv->dev->release = (void (*)(struct device *)) kfree;
        rc = device_register(priv->dev);
@@ -1376,11 +1330,6 @@ static int __init hvc_iucv_init(void)
                goto out_error;
        }
 
-       /* register IUCV HVC device driver */
-       rc = driver_register(&hvc_iucv_driver);
-       if (rc)
-               goto out_error;
-
        /* parse hvc_iucv_allow string and create z/VM user ID filter list */
        if (hvc_iucv_filter_string) {
                rc = hvc_iucv_setup_filter(hvc_iucv_filter_string);