Skip to content

Commit ff398b8

Browse files
committed
mfd: rp1: Fix device links when modules disabled
Device links are used to keep track of suppliers and consumers of resources, adding some control over the ordering of device probes other than return EPROBE_DEFER. The way the RP1 device is created breaks this mechanism in the rare case that the use of modules has been completed disabled, thanks to some some opimisations within the device link code. Fix this glitch by giving the corresponding fwnode a pointer to the device, taking the opportunity to remove a pointless check on the validity of the rp1_node pointer. See: #7019 Signed-off-by: Phil Elwell <[email protected]>
1 parent be9088a commit ff398b8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/mfd/rp1.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,8 @@ static int rp1_probe(struct pci_dev *pdev, const struct pci_device_id *id)
340340
rp1_chained_handle_irq);
341341
}
342342

343-
if (rp1_node)
344-
of_platform_populate(rp1_node, NULL, NULL, &pcie_pdev->dev);
345-
343+
of_node_to_fwnode(rp1_node)->dev = rp1->dev;
344+
of_platform_populate(rp1_node, NULL, NULL, &pcie_pdev->dev);
346345
of_node_put(rp1_node);
347346

348347
return 0;

0 commit comments

Comments
 (0)