Commit 120a50df authored by Michael Ellerman's avatar Michael Ellerman Committed by Greg Kroah-Hartman

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

Use pci_find_ht_capability() in drivers/pci/htirq.c
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 687d5fe3
...@@ -99,14 +99,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update) ...@@ -99,14 +99,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
int pos; int pos;
int irq; int irq;
pos = pci_find_capability(dev, PCI_CAP_ID_HT); pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
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);
}
if (!pos) if (!pos)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment