diff options
author | Amit Shah <amit.shah@redhat.com> | 2012-03-29 03:20:20 -0400 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2012-03-30 22:39:50 -0400 |
commit | f38f8387cbdc4138a492ce9f2a5f04fd3cd3cf33 (patch) | |
tree | 037dfe639de15cbf6be59182872531a23cc20398 /drivers/virtio | |
parent | e47d854e57698d3be4579d2118f6057f9f12a17c (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')
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 6 | ||||
-rw-r--r-- | drivers/virtio/virtio_pci.c | 28 |
2 files changed, 1 insertions, 33 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 9f1bb36d67ff..05f0a80818a2 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -398,11 +398,6 @@ static int restore_common(struct virtio_device *vdev) | |||
398 | return 0; | 398 | return 0; |
399 | } | 399 | } |
400 | 400 | ||
401 | static int virtballoon_thaw(struct virtio_device *vdev) | ||
402 | { | ||
403 | return restore_common(vdev); | ||
404 | } | ||
405 | |||
406 | static int virtballoon_restore(struct virtio_device *vdev) | 401 | static int virtballoon_restore(struct virtio_device *vdev) |
407 | { | 402 | { |
408 | return restore_common(vdev); | 403 | return restore_common(vdev); |
@@ -426,7 +421,6 @@ static struct virtio_driver virtio_balloon_driver = { | |||
426 | #ifdef CONFIG_PM | 421 | #ifdef CONFIG_PM |
427 | .freeze = virtballoon_freeze, | 422 | .freeze = virtballoon_freeze, |
428 | .restore = virtballoon_restore, | 423 | .restore = virtballoon_restore, |
429 | .thaw = virtballoon_thaw, | ||
430 | #endif | 424 | #endif |
431 | }; | 425 | }; |
432 | 426 | ||
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 | ||
776 | static 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 | |||
802 | static int virtio_pci_restore(struct device *dev) | 776 | static 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 | }; |