See also commit 'pci: remove pci_config_set_vendor_id'.

Signed-off-by: Hu Tao <hu...@cn.fujitsu.com>
---
 hw/audio/intel-hda.c | 2 +-
 hw/i2c/smbus_ich9.c  | 2 +-
 hw/ide/ich.c         | 2 +-
 hw/isa/i82378.c      | 2 +-
 hw/misc/ivshmem.c    | 2 +-
 hw/misc/vfio.c       | 2 +-
 hw/scsi/vmw_pvscsi.c | 2 +-
 hw/usb/hcd-uhci.c    | 2 +-
 include/hw/pci/pci.h | 6 ------
 9 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 2885231..50ff3dd 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -1133,7 +1133,7 @@ static int intel_hda_init(PCIDevice *pci)
 
     d->name = object_get_typename(OBJECT(d));
 
-    pci_config_set_interrupt_pin(conf, 1);
+    pci_set_byte(conf + PCI_INTERRUPT_PIN, 1);
 
     /* HDCTL off 0x40 bit 0 selects signaling mode (1-HDA, 0 - Ac97) 18.1.19 */
     conf[0x40] = 0x01;
diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c
index 0803dc4..ce14450 100644
--- a/hw/i2c/smbus_ich9.c
+++ b/hw/i2c/smbus_ich9.c
@@ -76,7 +76,7 @@ static int ich9_smbus_initfn(PCIDevice *d)
     ICH9SMBState *s = ICH9_SMB_DEVICE(d);
 
     /* TODO? D31IP.SMIP in chipset configuration space */
-    pci_config_set_interrupt_pin(d->config, 0x01); /* interrupt pin 1 */
+    pci_set_byte(d->config + PCI_INTERRUPT_PIN, 0x01); /* interrupt pin 1 */
 
     pci_set_byte(d->config + ICH9_SMB_HOSTC, 0);
     /* TODO bar0, bar1: 64bit BAR support*/
diff --git a/hw/ide/ich.c b/hw/ide/ich.c
index 0263579..0be60f6 100644
--- a/hw/ide/ich.c
+++ b/hw/ide/ich.c
@@ -111,7 +111,7 @@ static int pci_ich9_ahci_init(PCIDevice *dev)
 
     dev->config[PCI_CACHE_LINE_SIZE] = 0x08;  /* Cache line size */
     dev->config[PCI_LATENCY_TIMER]   = 0x00;  /* Latency timer */
-    pci_config_set_interrupt_pin(dev->config, 1);
+    pci_set_byte(dev->config + PCI_INTERRUPT_PIN, 1);
 
     /* XXX Software should program this register */
     dev->config[0x90]   = 1 << 6; /* Address Map Register - AHCI mode */
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index a7d9aa6..7399121 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -73,7 +73,7 @@ static int i82378_initfn(PCIDevice *pci)
     pci_set_word(pci_conf + PCI_STATUS,
                  PCI_STATUS_DEVSEL_MEDIUM);
 
-    pci_config_set_interrupt_pin(pci_conf, 1); /* interrupt pin 0 */
+    pci_set_byte(pci_conf + PCI_INTERRUPT_PIN, 1); /* interrupt pin 0 */
 
     isabus = isa_bus_new(dev, pci_address_space_io(pci));
 
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 5d272c8..06573ea 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -747,7 +747,7 @@ static int pci_ivshmem_init(PCIDevice *dev)
     pci_conf = dev->config;
     pci_conf[PCI_COMMAND] = PCI_COMMAND_IO | PCI_COMMAND_MEMORY;
 
-    pci_config_set_interrupt_pin(pci_conf, 1);
+    pci_set_byte(pci_conf + PCI_INTERRUPT_PIN, 1);
 
     s->shm_fd = 0;
 
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index fd318a1..151d77e 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -561,7 +561,7 @@ static int vfio_enable_intx(VFIODevice *vdev)
     vfio_disable_interrupts(vdev);
 
     vdev->intx.pin = pin - 1; /* Pin A (1) -> irq[0] */
-    pci_config_set_interrupt_pin(vdev->pdev.config, pin);
+    pci_set_byte(vdev->pdev.config + PCI_INTERRUPT_PIN, pin);
 
 #ifdef CONFIG_KVM
     /*
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index d3a92fb..6f3a48d 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -1077,7 +1077,7 @@ pvscsi_init(PCIDevice *pci_dev)
     pci_dev->config[PCI_LATENCY_TIMER] = 0xff;
 
     /* Interrupt pin A */
-    pci_config_set_interrupt_pin(pci_dev->config, 1);
+    pci_set_byte(pci_dev->config + PCI_INTERRUPT_PIN, 1);
 
     memory_region_init_io(&s->io_space, OBJECT(s), &pvscsi_ops, s,
                           "pvscsi-io", PVSCSI_MEM_SPACE_SIZE);
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index 4a4215d..4e2efd9 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -1202,7 +1202,7 @@ static int usb_uhci_common_initfn(PCIDevice *dev)
     /* TODO: reset value should be 0. */
     pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
 
-    pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1);
+    pci_set_byte(pci_conf + PCI_INTERRUPT_PIN, u->info.irq_pin + 1);
 
     if (s->masterbus) {
         USBPort *ports[NB_PORTS];
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 1294e23..1da4be7 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -461,12 +461,6 @@ pci_get_quad(const uint8_t *config)
     return le64_to_cpup((const uint64_t *)config);
 }
 
-static inline void
-pci_config_set_interrupt_pin(uint8_t *pci_config, uint8_t val)
-{
-    pci_set_byte(&pci_config[PCI_INTERRUPT_PIN], val);
-}
-
 /*
  * helper functions to do bit mask operation on configuration space.
  * Just to set bit, use test-and-set and discard returned value.
-- 
1.9.3


Reply via email to