]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
virtio: Allow virtio to be modular and used by modules
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 5 Feb 2008 04:50:05 +0000 (23:50 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 4 Feb 2008 12:50:06 +0000 (23:50 +1100)
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>
drivers/virtio/Kconfig
drivers/virtio/virtio.c
drivers/virtio/virtio_ring.c

index 9e33fc4da875010f11b95e1512f57ba69c593e01..de0c8c2654ef375573766ab52ad321e853a0e638 100644 (file)
@@ -1,8 +1,8 @@
 # Virtio always gets selected by whoever wants it.
 config VIRTIO
-       bool
+       tristate
 
 # Similarly the virtio ring implementation.
 config VIRTIO_RING
-       bool
+       tristate
        depends on VIRTIO
index 7dddb1860936a1c35066cd08596d67f3d46501f8..b535483bc556f5f153eb434583c8dc6593377164 100644 (file)
@@ -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");
index 74c245092b5cbcb4f96ecc0c5f038ccb85aa3b6f..3a28c1382131d04940035448d24aada5244e7589 100644 (file)
@@ -266,6 +266,7 @@ irqreturn_t vring_interrupt(int irq, void *_vq)
 
        return IRQ_HANDLED;
 }
+EXPORT_SYMBOL_GPL(vring_interrupt);
 
 static struct virtqueue_ops vring_vq_ops = {
        .add_buf = vring_add_buf,
@@ -318,9 +319,12 @@ struct virtqueue *vring_new_virtqueue(unsigned int num,
 
        return &vq->vq;
 }
+EXPORT_SYMBOL_GPL(vring_new_virtqueue);
 
 void vring_del_virtqueue(struct virtqueue *vq)
 {
        kfree(to_vvq(vq));
 }
+EXPORT_SYMBOL_GPL(vring_del_virtqueue);
 
+MODULE_LICENSE("GPL");