summaryrefslogtreecommitdiff
path: root/com32/lib/pci/scan.c
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-14 08:17:39 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-14 08:17:39 +0100
commitd213082d76a24d3ba2e033416891a170b39c1ded (patch)
tree50f586ac8988d53a5789c8203b693f70e5320230 /com32/lib/pci/scan.c
parent56bd7c3ec4446d237f82ede9928ccff075d47041 (diff)
downloadsyslinux-d213082d76a24d3ba2e033416891a170b39c1ded.tar.gz
hdt: irq have to be in dev_info
Moving irq stuff to the dev_info structure to keep coherent
Diffstat (limited to 'com32/lib/pci/scan.c')
-rw-r--r--com32/lib/pci/scan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/com32/lib/pci/scan.c b/com32/lib/pci/scan.c
index 0c521007..1e1dce2b 100644
--- a/com32/lib/pci/scan.c
+++ b/com32/lib/pci/scan.c
@@ -532,7 +532,13 @@ void gather_additional_pci_config(struct pci_domain *domain)
for (nfunc = 0; nfunc < maxfunc; nfunc++) {
a = pci_mkaddr(nbus, ndev, nfunc, 0);
- domain->bus[nbus]->slot[ndev]->func[nfunc]->irq = pci_readb(a + 0x3c);
+ struct pci_device *dev = domain->bus[nbus]->slot[ndev]->func[nfunc];
+ if (! dev->dev_info) {
+ dev->dev_info = zalloc(sizeof *dev->dev_info);
+ if (!dev->dev_info)
+ return;
+ }
+ dev->dev_info->irq = pci_readb(a + 0x3c);
}
}
}