mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
dm: pci: Optimize pci_uclass_post_bind()
If there is no pci device listed in the device tree, don't bother scanning the device tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3242998e24
commit
1887ed3ad6
1 changed files with 7 additions and 0 deletions
|
@ -631,6 +631,13 @@ error:
|
|||
|
||||
static int pci_uclass_post_bind(struct udevice *bus)
|
||||
{
|
||||
/*
|
||||
* If there is no pci device listed in the device tree,
|
||||
* don't bother scanning the device tree.
|
||||
*/
|
||||
if (bus->of_offset == -1)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Scan the device tree for devices. This does not probe the PCI bus,
|
||||
* as this is not permitted while binding. It just finds devices
|
||||
|
|
Loading…
Reference in a new issue