Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: sunxi: handle probe defferal

When checking the logs on my sun8i-a33-olinuxino I saw:
sun8i-a23-r-pinctrl 1f02c00.pinctrl: Reset controller missing
but this driver was working after.
This message is just here because the reset controller was still not probed.
So don't say anything if the return code say to wait.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Link: https://lore.kernel.org/r/1585818532-23051-1-git-send-email-clabbe@baylibre.com
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Corentin Labbe and committed by
Linus Walleij
39eb3cc8 9c95f7c2

+5 -2
+5 -2
drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
··· 103 103 104 104 rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); 105 105 if (IS_ERR(rstc)) { 106 - dev_err(&pdev->dev, "Reset controller missing\n"); 107 - return PTR_ERR(rstc); 106 + ret = PTR_ERR(rstc); 107 + if (ret == -EPROBE_DEFER) 108 + return ret; 109 + dev_err(&pdev->dev, "Reset controller missing err=%d\n", ret); 110 + return ret; 108 111 } 109 112 110 113 ret = reset_control_deassert(rstc);