Skip to content

Commit b7de1b6

Browse files
jamesequinlankwilczynski
authored andcommitted
PCI: brcmstb: Fix potential premature regulator disabling
The platform supports enabling and disabling regulators only on ports below the Root Complex. Thus, we need to verify this both when adding and removing the bus, otherwise regulators may be disabled prematurely when a bus further down the topology is removed. Fixes: 9e6be01 ("PCI: brcmstb: Enable child bus device regulators from DT") Signed-off-by: Jim Quinlan <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <[email protected]>
1 parent 3651ad5 commit b7de1b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ static void brcm_pcie_remove_bus(struct pci_bus *bus)
14401440
struct subdev_regulators *sr = pcie->sr;
14411441
struct device *dev = &bus->dev;
14421442

1443-
if (!sr)
1443+
if (!sr || !bus->parent || !pci_is_root_bus(bus->parent))
14441444
return;
14451445

14461446
if (regulator_bulk_disable(sr->num_supplies, sr->supplies))

0 commit comments

Comments
 (0)