Skip to content

Commit 6f2aa55

Browse files
alcooperstorulf
authored andcommitted
mmc: sdhci-brcmstb: Fix driver to defer on clk_get defer
The new SCMI clock protocol driver does not get probed that early in boot. Brcmstb drivers typically have the following code when getting a clock: priv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(priv->clk)) { dev_err(&pdev->dev, "Clock not found in Device Tree\n"); priv->clk = NULL; } This commit changes the driver to do what is below. priv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(priv->clk)) { if (PTR_ERR(priv->clk) == -EPROBE_DEFER) return -EPROBE_DEFER; dev_err(&pdev->dev, "Clock not found in Device Tree\n"); priv->clk = NULL; } Signed-off-by: Al Cooper <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 78ab82f commit 6f2aa55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/mmc/host/sdhci-brcmstb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
9191

9292
clk = devm_clk_get(&pdev->dev, NULL);
9393
if (IS_ERR(clk)) {
94+
if (PTR_ERR(clk) == -EPROBE_DEFER)
95+
return -EPROBE_DEFER;
9496
dev_err(&pdev->dev, "Clock not found in Device Tree\n");
9597
clk = NULL;
9698
}

0 commit comments

Comments
 (0)