]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: xilinx-nwl: Use pci_is_root_bus() to check if bus is root bus
authorRob Herring <robh@kernel.org>
Wed, 22 Jul 2020 02:25:02 +0000 (20:25 -0600)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 23 Jul 2020 10:20:50 +0000 (11:20 +0100)
commit2fbaad5a0206a7d75a37f2ca3e9a68fc6b73d797
treeff7885037fe931fd74c39097a0c7d3db8b4ef9f0
parentf3b3a97f53edd169cd350e66b333c376d0d0bf20
PCI: xilinx-nwl: Use pci_is_root_bus() to check if bus is root bus

Use pci_is_root_bus() rather than tracking the root bus number to
determine if the bus is the root bus or not. This removes storing
duplicated data as well as the need for the host bridge driver to have
to care about the bus numbers in most cases.

There was also a bug that the pci_host_bridge.busnr is set from
root_busno, but root_busno is never set which means the root bus number
is always 0 even if the DT said something else.

Link: https://lore.kernel.org/r/20200722022514.1283916-8-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Michal Simek <michal.simek@xilinx.com>
drivers/pci/controller/pcie-xilinx-nwl.c