From: Kenji Kaneshige Date: Tue, 26 May 2009 07:07:33 +0000 (+0900) Subject: PCI: use pci_is_root_bus() in pci_get_interrupt_pin() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8784fd4d497171882319e4b513f5a5949fc8ab43;p=linux-beck.git PCI: use pci_is_root_bus() in pci_get_interrupt_pin() Use pci_is_root_bus() in pci_get_interrupt_pin() for checking if the pci bus is root, for code consistency. Reviewed-by: Alex Chiang Reviewed-by: Grant Grundler Signed-off-by: Kenji Kaneshige Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 56fb18d2cb52..70b3b44a8b6c 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1529,7 +1529,7 @@ pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge) if (!pin) return -1; - while (dev->bus->parent) { + while (!pci_is_root_bus(dev->bus)) { pin = pci_swizzle_interrupt_pin(dev, pin); dev = dev->bus->self; }