OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cd71b9
)
regulator: anatop: Lower error message level for -EPROBE_DEFER
author
Anson Huang
<Anson.Huang@nxp.com>
Tue, 3 Mar 2020 13:44:12 +0000
(21:44 +0800)
committer
Mark Brown
<broonie@kernel.org>
Tue, 3 Mar 2020 14:31:48 +0000
(14:31 +0000)
devm_regulator_register() could return -EPROBE_DEFER when trying to
get init data and NOT all resources are available at that time, for
this case, error message is better to be present for debug level ONLY.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Link:
https://lore.kernel.org/r/1583243052-1930-1-git-send-email-Anson.Huang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/anatop-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/anatop-regulator.c
b/drivers/regulator/anatop-regulator.c
index
754739d
..
ca92b3d
100644
(file)
--- a/
drivers/regulator/anatop-regulator.c
+++ b/
drivers/regulator/anatop-regulator.c
@@
-305,9
+305,13
@@
static int anatop_regulator_probe(struct platform_device *pdev)
/* register regulator */
rdev = devm_regulator_register(dev, rdesc, &config);
if (IS_ERR(rdev)) {
- dev_err(dev, "failed to register %s\n",
- rdesc->name);
- return PTR_ERR(rdev);
+ ret = PTR_ERR(rdev);
+ if (ret == -EPROBE_DEFER)
+ dev_dbg(dev, "failed to register %s, deferring...\n",
+ rdesc->name);
+ else
+ dev_err(dev, "failed to register %s\n", rdesc->name);
+ return ret;
}
platform_set_drvdata(pdev, rdev);