diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-12-01 10:03:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-12-01 10:03:49 +0000 |
commit | 8f1d4c65924a2d85f41950c53088920fceb05aa1 (patch) | |
tree | 9cd6f21843211a5fe30bdde1ef9940276b602dd4 | |
parent | b1c9c79cd7c8abd4d3c6d5260a3af293267c4f5d (diff) | |
download | ldetect-8f1d4c65924a2d85f41950c53088920fceb05aa1.tar ldetect-8f1d4c65924a2d85f41950c53088920fceb05aa1.tar.gz ldetect-8f1d4c65924a2d85f41950c53088920fceb05aa1.tar.bz2 ldetect-8f1d4c65924a2d85f41950c53088920fceb05aa1.tar.xz ldetect-8f1d4c65924a2d85f41950c53088920fceb05aa1.zip |
(pci_probe) simplify reusing pci_find_cap()
-rw-r--r-- | pci.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -36,7 +36,6 @@ extern struct pciusb_entries pci_probe(void) { static struct pci_access *pacc; struct pci_dev *dev; char classbuf[128], vendorbuf[128], devbuf[128]; - struct pci_cap *cap; pacc = pci_alloc(); @@ -87,13 +86,8 @@ extern struct pciusb_entries pci_probe(void) { e->subdevice = 0xffff; } - for (cap = dev->first_cap; cap; cap = cap->next) { - switch (cap->id) { - case PCI_CAP_ID_EXP: + if (pci_find_cap(dev,PCI_CAP_ID_EXP, PCI_CAP_NORMAL)) e->is_pciexpress = 1; - break; - } - } /* special case for realtek 8139 that has two drivers */ if (e->vendor == 0x10ec && e->device == 0x8139) { |