virtio: make pci_device_id const
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 10 Feb 2013 05:27:39 +0000 (15:57 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 11 Feb 2013 05:02:18 +0000 (15:32 +1030)
Use DEVICE_TABLE macro which also makes table const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio_pci.c

index 52c5ce6..a7ce730 100644 (file)
@@ -91,9 +91,9 @@ struct virtio_pci_vq_info
 };
 
 /* Qumranet donated their vendor ID for devices 0x1000 thru 0x10FF. */
-static struct pci_device_id virtio_pci_id_table[] = {
-       { 0x1af4, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-       { 0 },
+static DEFINE_PCI_DEVICE_TABLE(virtio_pci_id_table) = {
+       { PCI_DEVICE(0x1af4, PCI_ANY_ID) },
+       { 0 }
 };
 
 MODULE_DEVICE_TABLE(pci, virtio_pci_id_table);