PCI: Add generic function to probe PCI host controllers
authorCyrille Pitchen <cyrille.pitchen@free-electrons.com>
Tue, 30 Jan 2018 20:56:52 +0000 (21:56 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 31 Jan 2018 11:09:51 +0000 (11:09 +0000)
commit49b8e3f3ed1d411a8f8fa5fbe72c88f3d1d43824
tree392a2b9b0050ee52fe7a06fbfd4de4fa9e6ef57c
parentc6dd8ecf303780a6ac818d61a7b83cfd7e2525d1
PCI: Add generic function to probe PCI host controllers

This patchs moves generic source code from
drivers/pci/host/pci-host-common.c into drivers/pci/probe.c.

Indeed the extracted lines of code were duplicated by many host
controller drivers. Regrouping them into a generic function gives a
change to properly share this code without introducing a useless
dependency to PCI_HOST_COMMON, which selects PCI_ECAM when not needed by
most host controller drivers.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@free-electrons.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/host/pci-host-common.c
drivers/pci/probe.c
include/linux/pci.h