Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298384
b: refs/heads/master
c: f38f838
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah committed Mar 31, 2012
1 parent 9392da1 commit 83be99e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e47d854e57698d3be4579d2118f6057f9f12a17c
refs/heads/master: f38f8387cbdc4138a492ce9f2a5f04fd3cd3cf33
6 changes: 0 additions & 6 deletions trunk/drivers/virtio/virtio_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -426,7 +421,6 @@ static struct virtio_driver virtio_balloon_driver = {
#ifdef CONFIG_PM
.freeze = virtballoon_freeze,
.restore = virtballoon_restore,
.thaw = virtballoon_thaw,
#endif
};

Expand Down
28 changes: 1 addition & 27 deletions trunk/drivers/virtio/virtio_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
};
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit 83be99e

Please sign in to comment.