Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319818
b: refs/heads/master
c: 0bc1a2e
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed Jul 30, 2012
1 parent f57aef5 commit fe591b4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 178d855e7810deecb7fa96afdf82ec45b0284233
refs/heads/master: 0bc1a2ef19b45bb23617b203bc631b44609f17ba
17 changes: 17 additions & 0 deletions trunk/drivers/char/hw_random/virtio-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ static void __devexit virtrng_remove(struct virtio_device *vdev)
remove_common(vdev);
}

#ifdef CONFIG_PM
static int virtrng_freeze(struct virtio_device *vdev)
{
remove_common(vdev);
return 0;
}

static int virtrng_restore(struct virtio_device *vdev)
{
return probe_common(vdev);
}
#endif

static struct virtio_device_id id_table[] = {
{ VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID },
{ 0 },
Expand All @@ -135,6 +148,10 @@ static struct virtio_driver virtio_rng_driver = {
.id_table = id_table,
.probe = virtrng_probe,
.remove = __devexit_p(virtrng_remove),
#ifdef CONFIG_PM
.freeze = virtrng_freeze,
.restore = virtrng_restore,
#endif
};

static int __init init(void)
Expand Down

0 comments on commit fe591b4

Please sign in to comment.