device/pci_device.c: Reuse `irq` variable

The `irq` variable has the same value as `pIntAtoD[line - 1]`.

Change-Id: Iabf760adbc3014b32cfe6f908dc04c38b71bd980
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55892
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
This commit is contained in:
Angel Pons 2021-06-28 11:59:33 +02:00 committed by Patrick Georgi
parent 34237863ff
commit ceca5dedbc
1 changed files with 2 additions and 3 deletions

View File

@ -1633,11 +1633,10 @@ void pci_assign_irqs(struct device *dev, const unsigned char pIntAtoD[4])
printk(BIOS_DEBUG, "Assigning IRQ %d to %s\n", irq, dev_path(dev));
pci_write_config8(dev, PCI_INTERRUPT_LINE, pIntAtoD[line - 1]);
pci_write_config8(dev, PCI_INTERRUPT_LINE, irq);
/* Change to level triggered. */
i8259_configure_irq_trigger(pIntAtoD[line - 1],
IRQ_LEVEL_TRIGGERED);
i8259_configure_irq_trigger(irq, IRQ_LEVEL_TRIGGERED);
}
}