regulator: Fix up a confusing dev_warn when DT lookup fails
authorRajendra Nayak <rnayak@ti.com>
Fri, 16 Mar 2012 10:20:21 +0000 (15:50 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 16 Mar 2012 19:26:09 +0000 (19:26 +0000)
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: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/core.c

index b97c4a256636bdb31de469e0b41b7609cadd4dca..fc4ccf880cbc631c33ee71e61223991f69bbbde9 100644 (file)
@@ -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;
        }