提交 16fbcc3b 编写于 作者: R Rajendra Nayak 提交者: Mark Brown

regulator: Fix up a confusing dev_warn when DT lookup fails

of_parse_phandle() returns NULL either if the property name
itself does not exist or if it (exists and) does not
reference a valid phandle.
Giving out a warn like the one below (that the property references
an invalid phandle) can be confusing when the property itself
does not exist in the node.
Fix it with a more sensible message and make it a dev_dbg instead
of a dev_warn.
Reported-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: NRajendra Nayak <rnayak@ti.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 07351233
......@@ -148,7 +148,7 @@ static struct device_node *of_get_regulator(struct device *dev, const char *supp
regnode = of_parse_phandle(dev->of_node, prop_name, 0);
if (!regnode) {
dev_warn(dev, "%s property in node %s references invalid phandle",
dev_dbg(dev, "Looking up %s property in node %s failed",
prop_name, dev->of_node->full_name);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册