Commit a6307b086bb8de32c25b59cc2212a69a987c24a6

Authored by Gerd Hoffmann
Committed by Anthony Liguori
1 parent 05cb5fe4

qdev/pci: use qdev_prop_pci_devfn

Put the new property into use.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 4 additions and 4 deletions
hw/pci.c
... ... @@ -61,8 +61,8 @@ static struct BusInfo pci_bus_info = {
61 61 .print_dev = pcibus_dev_print,
62 62 .props = (Property[]) {
63 63 {
64   - .name = "devfn",
65   - .info = &qdev_prop_uint32,
  64 + .name = "addr",
  65 + .info = &qdev_prop_pci_devfn,
66 66 .offset = offsetof(PCIDevice, devfn),
67 67 .defval = (uint32_t[]) { -1 },
68 68 },
... ... @@ -782,7 +782,7 @@ PCIDevice *pci_create(const char *name, const char *devaddr)
782 782 }
783 783  
784 784 dev = qdev_create(&bus->qbus, name);
785   - qdev_prop_set_uint32(dev, "devfn", devfn);
  785 + qdev_prop_set_uint32(dev, "addr", devfn);
786 786 return (PCIDevice *)dev;
787 787 }
788 788  
... ... @@ -932,7 +932,7 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)
932 932 DeviceState *dev;
933 933  
934 934 dev = qdev_create(&bus->qbus, name);
935   - qdev_prop_set_uint32(dev, "devfn", devfn);
  935 + qdev_prop_set_uint32(dev, "addr", devfn);
936 936 qdev_init(dev);
937 937  
938 938 return (PCIDevice *)dev;
... ...