aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_pci.c
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2012-03-29 03:20:20 -0400
committerAmit Shah <amit.shah@redhat.com>2012-03-30 22:39:50 -0400
commitf38f8387cbdc4138a492ce9f2a5f04fd3cd3cf33 (patch)
tree037dfe639de15cbf6be59182872531a23cc20398 /drivers/virtio/virtio_pci.c
parente47d854e57698d3be4579d2118f6057f9f12a17c (diff)
virtio: drop thaw PM operation
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>
Diffstat (limited to 'drivers/virtio/virtio_pci.c')
-rw-r--r--drivers/virtio/virtio_pci.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 635e1efb3792..a35a402dfd78 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -773,32 +773,6 @@ static int restore_common(struct device *dev)
773 return ret; 773 return ret;
774} 774}
775 775
776static int virtio_pci_thaw(struct device *dev)
777{
778 struct pci_dev *pci_dev = to_pci_dev(dev);
779 struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
780 struct virtio_driver *drv;
781 int ret;
782
783 ret = restore_common(dev);
784 if (ret)
785 return ret;
786
787 drv = container_of(vp_dev->vdev.dev.driver,
788 struct virtio_driver, driver);
789
790 if (drv && drv->thaw)
791 ret = drv->thaw(&vp_dev->vdev);
792 else if (drv && drv->restore)
793 ret = drv->restore(&vp_dev->vdev);
794
795 /* Finally, tell the device we're all set */
796 if (!ret)
797 vp_set_status(&vp_dev->vdev, vp_dev->saved_status);
798
799 return ret;
800}
801
802static int virtio_pci_restore(struct device *dev) 776static int virtio_pci_restore(struct device *dev)
803{ 777{
804 struct pci_dev *pci_dev = to_pci_dev(dev); 778 struct pci_dev *pci_dev = to_pci_dev(dev);
@@ -824,7 +798,7 @@ static const struct dev_pm_ops virtio_pci_pm_ops = {
824 .suspend = virtio_pci_suspend, 798 .suspend = virtio_pci_suspend,
825 .resume = virtio_pci_resume, 799 .resume = virtio_pci_resume,
826 .freeze = virtio_pci_freeze, 800 .freeze = virtio_pci_freeze,
827 .thaw = virtio_pci_thaw, 801 .thaw = virtio_pci_restore,
828 .restore = virtio_pci_restore, 802 .restore = virtio_pci_restore,
829 .poweroff = virtio_pci_suspend, 803 .poweroff = virtio_pci_suspend,
830}; 804};