diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hw_random/virtio-rng.c | 13 | ||||
-rw-r--r-- | drivers/net/virtio_net.c | 12 | ||||
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 13 |
3 files changed, 3 insertions, 35 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 = { | |||
154 | #endif | 154 | #endif |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static int __init init(void) | 157 | module_virtio_driver(virtio_rng_driver); |
158 | { | ||
159 | return register_virtio_driver(&virtio_rng_driver); | ||
160 | } | ||
161 | |||
162 | static void __exit fini(void) | ||
163 | { | ||
164 | unregister_virtio_driver(&virtio_rng_driver); | ||
165 | } | ||
166 | module_init(init); | ||
167 | module_exit(fini); | ||
168 | |||
169 | MODULE_DEVICE_TABLE(virtio, id_table); | 158 | MODULE_DEVICE_TABLE(virtio, id_table); |
170 | MODULE_DESCRIPTION("Virtio random number driver"); | 159 | MODULE_DESCRIPTION("Virtio random number driver"); |
171 | MODULE_LICENSE("GPL"); | 160 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a6fcf15adc4f..80fb683d9d3a 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -1645,17 +1645,7 @@ static struct virtio_driver virtio_net_driver = { | |||
1645 | #endif | 1645 | #endif |
1646 | }; | 1646 | }; |
1647 | 1647 | ||
1648 | static int __init init(void) | 1648 | module_virtio_driver(virtio_net_driver); |
1649 | { | ||
1650 | return register_virtio_driver(&virtio_net_driver); | ||
1651 | } | ||
1652 | |||
1653 | static void __exit fini(void) | ||
1654 | { | ||
1655 | unregister_virtio_driver(&virtio_net_driver); | ||
1656 | } | ||
1657 | module_init(init); | ||
1658 | module_exit(fini); | ||
1659 | 1649 | ||
1660 | MODULE_DEVICE_TABLE(virtio, id_table); | 1650 | MODULE_DEVICE_TABLE(virtio, id_table); |
1661 | MODULE_DESCRIPTION("Virtio network driver"); | 1651 | MODULE_DESCRIPTION("Virtio network driver"); |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 797e1c79a104..8dab163c5ef0 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -560,18 +560,7 @@ static struct virtio_driver virtio_balloon_driver = { | |||
560 | #endif | 560 | #endif |
561 | }; | 561 | }; |
562 | 562 | ||
563 | static int __init init(void) | 563 | module_virtio_driver(virtio_balloon_driver); |
564 | { | ||
565 | return register_virtio_driver(&virtio_balloon_driver); | ||
566 | } | ||
567 | |||
568 | static void __exit fini(void) | ||
569 | { | ||
570 | unregister_virtio_driver(&virtio_balloon_driver); | ||
571 | } | ||
572 | module_init(init); | ||
573 | module_exit(fini); | ||
574 | |||
575 | MODULE_DEVICE_TABLE(virtio, id_table); | 564 | MODULE_DEVICE_TABLE(virtio, id_table); |
576 | MODULE_DESCRIPTION("Virtio balloon driver"); | 565 | MODULE_DESCRIPTION("Virtio balloon driver"); |
577 | MODULE_LICENSE("GPL"); | 566 | MODULE_LICENSE("GPL"); |