]> asedeno.scripts.mit.edu Git - linux.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)
commit14fe5951b667872154d753e451dea043050e9006
tree642ec0c399b27ca86e4aa0a504b3c6d737bbe637
parent3374c545c27c5350b954d1ab03c880d5502e5eba
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