Patchwork [35/61] piix_pci: use pci_swizzle_map_irq_fn().

login
register
mail settings
Submitter Isaku Yamahata
Date Sept. 30, 2009, 10:18 a.m.
Message ID <1254305917-14784-36-git-send-email-yamahata@valinux.co.jp>
Download mbox | patch
Permalink /patch/34585/
State Superseded
Headers show

Comments

Isaku Yamahata - Sept. 30, 2009, 10:18 a.m.
use pci_swizzle_map_irq_fn().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/piix_pci.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 329aa45..87cdbd9 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -69,9 +69,7 @@  static void piix3_set_irq(void *opaque, int irq_num, int level);
    mapping. */
 static int pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num)
 {
-    int slot_addend;
-    slot_addend = (pci_dev->devfn >> 3) - 1;
-    return (irq_num + slot_addend) & 3;
+    return pci_swizzle_map_irq_fn(pci_dev, irq_num);
 }
 
 static void update_pam(PCII440FXState *d, uint32_t start, uint32_t end, int r)