소스 검색

PCI: use pci_is_root_bus() in pci_common_swizzle()

Use pci_is_root_bus() in pci_common_swizzle() for checking if the pci
bus is root, for code consistency.

Reviewed-by: Alex Chiang <achiang@hp.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Kenji Kaneshige 16 년 전
부모
커밋
1eb3948716
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/pci/pci.c

+ 1 - 1
drivers/pci/pci.c

@@ -1549,7 +1549,7 @@ u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp)
 {
 {
 	u8 pin = *pinp;
 	u8 pin = *pinp;
 
 
-	while (dev->bus->parent) {
+	while (!pci_is_root_bus(dev->bus)) {
 		pin = pci_swizzle_interrupt_pin(dev, pin);
 		pin = pci_swizzle_interrupt_pin(dev, pin);
 		dev = dev->bus->self;
 		dev = dev->bus->self;
 	}
 	}