summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/virtio-rng.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-02-13 07:29:28 +0100
committerRusty Russell <rusty@rustcorp.com.au>2013-02-13 07:30:37 +0100
commitb2a17029c29bb6f7dec580feffa715b9fcf51e42 (patch)
tree2db568a277276ca7d4bf49ce57935827ae6ee1ff /drivers/char/hw_random/virtio-rng.c
parentvirtio: Add module driver macro for virtio drivers. (diff)
downloadlinux-b2a17029c29bb6f7dec580feffa715b9fcf51e42.tar.xz
linux-b2a17029c29bb6f7dec580feffa715b9fcf51e42.zip
virtio: use module_virtio_driver.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char/hw_random/virtio-rng.c')
-rw-r--r--drivers/char/hw_random/virtio-rng.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index b65c10395959..10fd71ccf587 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -154,18 +154,7 @@ static struct virtio_driver virtio_rng_driver = {
#endif
};
-static int __init init(void)
-{
- return register_virtio_driver(&virtio_rng_driver);
-}
-
-static void __exit fini(void)
-{
- unregister_virtio_driver(&virtio_rng_driver);
-}
-module_init(init);
-module_exit(fini);
-
+module_virtio_driver(virtio_rng_driver);
MODULE_DEVICE_TABLE(virtio, id_table);
MODULE_DESCRIPTION("Virtio random number driver");
MODULE_LICENSE("GPL");