[openib-general] [PATCH 2/6] Use pci_find_ht_capability() in drivers/pci/htirq.c

Michael Ellerman michael at ellerman.id.au
Wed Nov 8 22:40:43 PST 2006


Use pci_find_ht_capability() in drivers/pci/htirq.c

Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---

 drivers/pci/htirq.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Index: msi/drivers/pci/htirq.c
===================================================================
--- msi.orig/drivers/pci/htirq.c
+++ msi/drivers/pci/htirq.c
@@ -124,14 +124,7 @@ int ht_create_irq(struct pci_dev *dev, i
 	int pos;
 	int irq;
 
-	pos = pci_find_capability(dev, PCI_CAP_ID_HT);
-	while (pos) {
-		u8 subtype;
-		pci_read_config_byte(dev, pos + 3, &subtype);
-		if (subtype == HT_CAPTYPE_IRQ)
-			break;
-		pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT);
-	}
+	pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
 	if (!pos)
 		return -EINVAL;
 




More information about the general mailing list