aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 17:49:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 17:49:12 -0500
commit3c834b6f41fa21a48389b13c3bf63aa8df1d7080 (patch)
tree126447276497510f44277e8442715e103e2cb85a /drivers/virtio
parent515d01f7726b9ba4838787d247115e1b259e1cc7 (diff)
parent8078db789a92b10ff6e2d713231b5367e014c53b (diff)
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull virtio updates from Rusty Russell: "All trivial, thanks to the stuff which didn't quite make it time" * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: virtio_console: Initialize guest_connected=true for rproc_serial virtio: use module_virtio_driver. virtio: Add module driver macro for virtio drivers. virtio_console: Use virtio device index to generate port name virtio: make pci_device_id const virtio: make config_ops const virtio-mmio: fix wrong comment about register offset virtio_console: Let unconnected rproc device receive data.
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_balloon.c13
-rw-r--r--drivers/virtio/virtio_mmio.c4
-rw-r--r--drivers/virtio/virtio_pci.c8
3 files changed, 7 insertions, 18 deletions
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
563static int __init init(void) 563module_virtio_driver(virtio_balloon_driver);
564{
565 return register_virtio_driver(&virtio_balloon_driver);
566}
567
568static void __exit fini(void)
569{
570 unregister_virtio_driver(&virtio_balloon_driver);
571}
572module_init(init);
573module_exit(fini);
574
575MODULE_DEVICE_TABLE(virtio, id_table); 564MODULE_DEVICE_TABLE(virtio, id_table);
576MODULE_DESCRIPTION("Virtio balloon driver"); 565MODULE_DESCRIPTION("Virtio balloon driver");
577MODULE_LICENSE("GPL"); 566MODULE_LICENSE("GPL");
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 31f966f4d27f..1ba0d6831015 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -75,7 +75,7 @@
75 * 75 *
76 * 0x050 W QueueNotify Queue notifier 76 * 0x050 W QueueNotify Queue notifier
77 * 0x060 R InterruptStatus Interrupt status register 77 * 0x060 R InterruptStatus Interrupt status register
78 * 0x060 W InterruptACK Interrupt acknowledge register 78 * 0x064 W InterruptACK Interrupt acknowledge register
79 * 0x070 RW Status Device status register 79 * 0x070 RW Status Device status register
80 * 80 *
81 * 0x100+ RW Device-specific configuration space 81 * 0x100+ RW Device-specific configuration space
@@ -423,7 +423,7 @@ static const char *vm_bus_name(struct virtio_device *vdev)
423 return vm_dev->pdev->name; 423 return vm_dev->pdev->name;
424} 424}
425 425
426static struct virtio_config_ops virtio_mmio_config_ops = { 426static const struct virtio_config_ops virtio_mmio_config_ops = {
427 .get = vm_get, 427 .get = vm_get,
428 .set = vm_set, 428 .set = vm_set,
429 .get_status = vm_get_status, 429 .get_status = vm_get_status,
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 0c142892c105..a7ce73029f59 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -91,9 +91,9 @@ struct virtio_pci_vq_info
91}; 91};
92 92
93/* Qumranet donated their vendor ID for devices 0x1000 thru 0x10FF. */ 93/* Qumranet donated their vendor ID for devices 0x1000 thru 0x10FF. */
94static struct pci_device_id virtio_pci_id_table[] = { 94static DEFINE_PCI_DEVICE_TABLE(virtio_pci_id_table) = {
95 { 0x1af4, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 95 { PCI_DEVICE(0x1af4, PCI_ANY_ID) },
96 { 0 }, 96 { 0 }
97}; 97};
98 98
99MODULE_DEVICE_TABLE(pci, virtio_pci_id_table); 99MODULE_DEVICE_TABLE(pci, virtio_pci_id_table);
@@ -652,7 +652,7 @@ static int vp_set_vq_affinity(struct virtqueue *vq, int cpu)
652 return 0; 652 return 0;
653} 653}
654 654
655static struct virtio_config_ops virtio_pci_config_ops = { 655static const struct virtio_config_ops virtio_pci_config_ops = {
656 .get = vp_get, 656 .get = vp_get,
657 .set = vp_set, 657 .set = vp_set,
658 .get_status = vp_get_status, 658 .get_status = vp_get_status,