virtio-pci: drop restore_common()

restore_common() was shared between restore and thaw callbacks. With
thaw gone, we don't need restore_common() anymore.

Signed-off-by: Amit Shah <amit.shah@redhat.com>

Amit Shah 0517fdd1 f38f8387

Changed files
+8 -17
drivers
virtio
+8 -17
drivers/virtio/virtio_pci.c
··· 758 758 return ret; 759 759 } 760 760 761 - static int restore_common(struct device *dev) 762 - { 763 - struct pci_dev *pci_dev = to_pci_dev(dev); 764 - struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); 765 - int ret; 766 - 767 - ret = pci_enable_device(pci_dev); 768 - if (ret) 769 - return ret; 770 - pci_set_master(pci_dev); 771 - vp_finalize_features(&vp_dev->vdev); 772 - 773 - return ret; 774 - } 775 - 776 761 static int virtio_pci_restore(struct device *dev) 777 762 { 778 763 struct pci_dev *pci_dev = to_pci_dev(dev); ··· 768 783 drv = container_of(vp_dev->vdev.dev.driver, 769 784 struct virtio_driver, driver); 770 785 771 - ret = restore_common(dev); 772 - if (!ret && drv && drv->restore) 786 + ret = pci_enable_device(pci_dev); 787 + if (ret) 788 + return ret; 789 + 790 + pci_set_master(pci_dev); 791 + vp_finalize_features(&vp_dev->vdev); 792 + 793 + if (drv && drv->restore) 773 794 ret = drv->restore(&vp_dev->vdev); 774 795 775 796 /* Finally, tell the device we're all set */