diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hw_random/virtio-rng.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 2dc9ce183cc6..a9673a757009 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -88,7 +88,7 @@ static struct hwrng virtio_hwrng = { | |||
88 | .read = virtio_read, | 88 | .read = virtio_read, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static int virtrng_probe(struct virtio_device *vdev) | 91 | static int probe_common(struct virtio_device *vdev) |
92 | { | 92 | { |
93 | int err; | 93 | int err; |
94 | 94 | ||
@@ -106,7 +106,7 @@ static int virtrng_probe(struct virtio_device *vdev) | |||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | static void __devexit virtrng_remove(struct virtio_device *vdev) | 109 | static void remove_common(struct virtio_device *vdev) |
110 | { | 110 | { |
111 | vdev->config->reset(vdev); | 111 | vdev->config->reset(vdev); |
112 | busy = false; | 112 | busy = false; |
@@ -114,6 +114,16 @@ static void __devexit virtrng_remove(struct virtio_device *vdev) | |||
114 | vdev->config->del_vqs(vdev); | 114 | vdev->config->del_vqs(vdev); |
115 | } | 115 | } |
116 | 116 | ||
117 | static int virtrng_probe(struct virtio_device *vdev) | ||
118 | { | ||
119 | return probe_common(vdev); | ||
120 | } | ||
121 | |||
122 | static void __devexit virtrng_remove(struct virtio_device *vdev) | ||
123 | { | ||
124 | remove_common(vdev); | ||
125 | } | ||
126 | |||
117 | static struct virtio_device_id id_table[] = { | 127 | static struct virtio_device_id id_table[] = { |
118 | { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID }, | 128 | { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID }, |
119 | { 0 }, | 129 | { 0 }, |