hw/pci-host/bonito: Use pci_config_set_interrupt_pin()
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Thu, 31 Dec 2020 21:04:13 +0000 (22:04 +0100)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 4 Jan 2021 22:24:44 +0000 (23:24 +0100)
Replace pci_set_byte(PCI_INTERRUPT_PIN) by
pci_config_set_interrupt_pin().

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
Message-Id: <20201231224911.1467352-5-f4bug@amsat.org>

hw/pci-host/bonito.c

index c2f71e5a1324a6c90a8041c89ab14919d6dbb047..2a2db7cea69f96364d74fcf1ec62aef51f19fc10 100644 (file)
@@ -728,7 +728,8 @@ static void bonito_realize(PCIDevice *dev, Error **errp)
     pci_set_word(dev->config + PCI_SUBSYSTEM_ID, 0x0000);
 
     pci_set_byte(dev->config + PCI_INTERRUPT_LINE, 0x00);
-    pci_set_byte(dev->config + PCI_INTERRUPT_PIN, 0x01);
+    pci_config_set_interrupt_pin(dev->config, 0x01); /* interrupt pin A */
+
     pci_set_byte(dev->config + PCI_MIN_GNT, 0x3c);
     pci_set_byte(dev->config + PCI_MAX_LAT, 0x00);