]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Move resource distribution for single bridge outside loop
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 28 May 2018 12:47:55 +0000 (15:47 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 4 Jun 2018 17:08:06 +0000 (12:08 -0500)
commit1fde62f6d39778674b2b835f40103017c135a4ac
tree642ec0c399b27ca86e4aa0a504b3c6d737bbe637
parentd2d4745b86528bffa0e63f50fd93f565442954c8
PCI: Move resource distribution for single bridge outside loop

If there is only a single bridge on the bus, we assign all resources to it.
Currently this is done as a part of the resource distribution loop but it
does not have to be there, and moving it outside actually improves
readability because we can then save one indent level in the loop.

While there we can add hotplug_bridges == 1 && normal_bridges == 0 to
the same block because they are dealt the same way.

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/pci/setup-bus.c