diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-05 07:50:05 +0300 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-04 15:50:06 +0300 |
commit | c6fd47011b4bdebad3f1513bac75fe4895e332ee (patch) | |
tree | 12224cdb2594be26e02291b142ba6e1e2c1c8122 /drivers/virtio/virtio.c | |
parent | 15f9c8903cbdb02aee0f1bcf86a97c2e238b9a3d (diff) | |
download | linux-c6fd47011b4bdebad3f1513bac75fe4895e332ee.tar.xz |
virtio: Allow virtio to be modular and used by modules
This is needed for the virtio PCI device to be compiled as a module.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio.c')
-rw-r--r-- | drivers/virtio/virtio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 7dddb1860936..b535483bc556 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -162,4 +162,12 @@ static int virtio_init(void) panic("virtio bus registration failed"); return 0; } + +static void __exit virtio_exit(void) +{ + bus_unregister(&virtio_bus); +} core_initcall(virtio_init); +module_exit(virtio_exit); + +MODULE_LICENSE("GPL"); |