UPSTREAM: extcon: Move extcon_get_edev_by_phandle() errors to dbg level
authorStephen Boyd <stephen.boyd@linaro.org>
Tue, 5 Jul 2016 18:57:05 +0000 (11:57 -0700)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 3 Aug 2016 01:44:06 +0000 (09:44 +0800)
Sometimes drivers may call this API and expect it to fail because
the extcon they're looking for is optional. Let's move these
prints to debug level so it doesn't look like there's a problem
when there isn't one.

Change-Id: Id3297af428cbaaef208e1990e1678b9ef04a7246
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
(cherry picked from commit 27210e4efd5259c691c4c3ab53e74239efa0d581)

drivers/extcon/extcon.c

index 7009687c692bb22c1263f095a789cdf892929810..540f7a0b0559107bade63824d96aeff02634e688 100644 (file)
@@ -846,13 +846,13 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
                return ERR_PTR(-EINVAL);
 
        if (!dev->of_node) {
-               dev_err(dev, "device does not have a device node entry\n");
+               dev_dbg(dev, "device does not have a device node entry\n");
                return ERR_PTR(-EINVAL);
        }
 
        node = of_parse_phandle(dev->of_node, "extcon", index);
        if (!node) {
-               dev_err(dev, "failed to get phandle in %s node\n",
+               dev_dbg(dev, "failed to get phandle in %s node\n",
                        dev->of_node->full_name);
                return ERR_PTR(-ENODEV);
        }