]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
virtio: drop thaw PM operation
authorAmit Shah <amit.shah@redhat.com>
Thu, 29 Mar 2012 07:20:20 +0000 (12:50 +0530)
committerAmit Shah <amit.shah@redhat.com>
Sat, 31 Mar 2012 02:39:50 +0000 (08:09 +0530)
The thaw operation was used by the balloon driver, but after the last
commit there's no reason to have separate thaw and restore callbacks.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
drivers/virtio/virtio_balloon.c
drivers/virtio/virtio_pci.c
include/linux/virtio.h

index 9f1bb36d67ffbbca45e755535f60c814111d5959..05f0a80818a2b1c202e2d5104ced13b9802287d0 100644 (file)
@@ -398,11 +398,6 @@ static int restore_common(struct virtio_device *vdev)
        return 0;
 }
 
-static int virtballoon_thaw(struct virtio_device *vdev)
-{
-       return restore_common(vdev);
-}
-
 static int virtballoon_restore(struct virtio_device *vdev)
 {
        return restore_common(vdev);
@@ -426,7 +421,6 @@ static struct virtio_driver virtio_balloon_driver = {
 #ifdef CONFIG_PM
        .freeze =       virtballoon_freeze,
        .restore =      virtballoon_restore,
-       .thaw =         virtballoon_thaw,
 #endif
 };
 
index 635e1efb3792689b6e283766a64af11be6dc8dc6..a35a402dfd78eb99c715752049ca2951fdd99849 100644 (file)
@@ -773,32 +773,6 @@ static int restore_common(struct device *dev)
        return ret;
 }
 
-static int virtio_pci_thaw(struct device *dev)
-{
-       struct pci_dev *pci_dev = to_pci_dev(dev);
-       struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
-       struct virtio_driver *drv;
-       int ret;
-
-       ret = restore_common(dev);
-       if (ret)
-               return ret;
-
-       drv = container_of(vp_dev->vdev.dev.driver,
-                          struct virtio_driver, driver);
-
-       if (drv && drv->thaw)
-               ret = drv->thaw(&vp_dev->vdev);
-       else if (drv && drv->restore)
-               ret = drv->restore(&vp_dev->vdev);
-
-       /* Finally, tell the device we're all set */
-       if (!ret)
-               vp_set_status(&vp_dev->vdev, vp_dev->saved_status);
-
-       return ret;
-}
-
 static int virtio_pci_restore(struct device *dev)
 {
        struct pci_dev *pci_dev = to_pci_dev(dev);
@@ -824,7 +798,7 @@ static const struct dev_pm_ops virtio_pci_pm_ops = {
        .suspend        = virtio_pci_suspend,
        .resume         = virtio_pci_resume,
        .freeze         = virtio_pci_freeze,
-       .thaw           = virtio_pci_thaw,
+       .thaw           = virtio_pci_restore,
        .restore        = virtio_pci_restore,
        .poweroff       = virtio_pci_suspend,
 };
index d0018d27c281ffa3a7135c1aa1a8deffc1b900ca..8efd28ae5597e6d80e0a5c4659b1de53424fb059 100644 (file)
@@ -96,7 +96,6 @@ struct virtio_driver {
        void (*config_changed)(struct virtio_device *dev);
 #ifdef CONFIG_PM
        int (*freeze)(struct virtio_device *dev);
-       int (*thaw)(struct virtio_device *dev);
        int (*restore)(struct virtio_device *dev);
 #endif
 };