summary refs log tree commit diff stats
path: root/hw/ivshmem.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-12-13 10:19:37 +0100
committerMichael S. Tsirkin <mst@redhat.com>2013-01-08 20:24:34 +0200
commitb8ef62a9b746f2d7078d97c7ee5d1c7a31b42d5d (patch)
tree73ebd1a14b4ce03cbf2d199e633b5ee397abeb53 /hw/ivshmem.c
parent13744bd0a054bc7a4b1432cc8facd23d41a9806e (diff)
downloadfocaccia-qemu-b8ef62a9b746f2d7078d97c7ee5d1c7a31b42d5d.tar.gz
focaccia-qemu-b8ef62a9b746f2d7078d97c7ee5d1c7a31b42d5d.zip
ivshmem: use symbolic constant for PCI ID, add to pci-ids.txt
Due to disagreement on a name that is generic enough for hw/pci/pci.h,
the symbolic constants are placed in the .c files.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/ivshmem.c')
-rw-r--r--hw/ivshmem.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index fcf5d05bae..c86fddd0b3 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -29,6 +29,9 @@
 #include <sys/mman.h>
 #include <sys/types.h>
 
+#define PCI_VENDOR_ID_IVSHMEM   PCI_VENDOR_ID_REDHAT_QUMRANET
+#define PCI_DEVICE_ID_IVSHMEM   0x1110
+
 #define IVSHMEM_IOEVENTFD   0
 #define IVSHMEM_MSI     1
 
@@ -800,8 +803,8 @@ static void ivshmem_class_init(ObjectClass *klass, void *data)
 
     k->init = pci_ivshmem_init;
     k->exit = pci_ivshmem_uninit;
-    k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    k->device_id = 0x1110;
+    k->vendor_id = PCI_VENDOR_ID_IVSHMEM;
+    k->device_id = PCI_DEVICE_ID_IVSHMEM;
     k->class_id = PCI_CLASS_MEMORY_RAM;
     dc->reset = ivshmem_reset;
     dc->props = ivshmem_properties;