* [PATCH] pinctrl: sunxi: do not print error message for EPROBE_DEFER
@ 2022-02-17 13:17 Mans Rullgard
2022-02-17 15:38 ` Chen-Yu Tsai
2022-02-19 1:09 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Mans Rullgard @ 2022-02-17 13:17 UTC (permalink / raw)
To: Linus Walleij, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
linux-gpio, linux-arm-kernel, linux-kernel
Avoid printing an error message if getting a regulator fails with
EPROBE_DEFER. This can happen if, for example, a regulator supplying
one of the main banks is controlled by a PL pin.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
drivers/pinctrl/sunxi/pinctrl-sunxi.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index e42a3a0005a7..534c42ee0718 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -777,11 +777,10 @@ static int sunxi_pmx_request(struct pinctrl_dev *pctldev, unsigned offset)
snprintf(supply, sizeof(supply), "vcc-p%c", 'a' + bank);
reg = regulator_get(pctl->dev, supply);
- if (IS_ERR(reg)) {
- dev_err(pctl->dev, "Couldn't get bank P%c regulator\n",
- 'A' + bank);
- return PTR_ERR(reg);
- }
+ if (IS_ERR(reg))
+ return dev_err_probe(pctl->dev, PTR_ERR(reg),
+ "Couldn't get bank P%c regulator\n",
+ 'A' + bank);
ret = regulator_enable(reg);
if (ret) {
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: sunxi: do not print error message for EPROBE_DEFER
2022-02-17 13:17 [PATCH] pinctrl: sunxi: do not print error message for EPROBE_DEFER Mans Rullgard
@ 2022-02-17 15:38 ` Chen-Yu Tsai
2022-02-19 1:09 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2022-02-17 15:38 UTC (permalink / raw)
To: Mans Rullgard
Cc: Linus Walleij, Maxime Ripard, Jernej Skrabec,
open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-kernel
On Thu, Feb 17, 2022 at 9:19 PM Mans Rullgard <mans@mansr.com> wrote:
>
> Avoid printing an error message if getting a regulator fails with
> EPROBE_DEFER. This can happen if, for example, a regulator supplying
> one of the main banks is controlled by a PL pin.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: sunxi: do not print error message for EPROBE_DEFER
2022-02-17 13:17 [PATCH] pinctrl: sunxi: do not print error message for EPROBE_DEFER Mans Rullgard
2022-02-17 15:38 ` Chen-Yu Tsai
@ 2022-02-19 1:09 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2022-02-19 1:09 UTC (permalink / raw)
To: Mans Rullgard
Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, linux-gpio,
linux-arm-kernel, linux-kernel
On Thu, Feb 17, 2022 at 2:18 PM Mans Rullgard <mans@mansr.com> wrote:
> Avoid printing an error message if getting a regulator fails with
> EPROBE_DEFER. This can happen if, for example, a regulator supplying
> one of the main banks is controlled by a PL pin.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
Patch applied, thanks!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-19 1:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17 13:17 [PATCH] pinctrl: sunxi: do not print error message for EPROBE_DEFER Mans Rullgard
2022-02-17 15:38 ` Chen-Yu Tsai
2022-02-19 1:09 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).