]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: enhance reporting of errors when loading from DT
authorJohn Crispin <blogic@openwrt.org>
Thu, 26 Apr 2012 14:47:11 +0000 (16:47 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 26 Apr 2012 21:11:04 +0000 (23:11 +0200)
commit443a39293f0a4906ecf29fec067bc8e8f967ee16
treefab32aafbdc9f2fd53d69afcaaf0b8997beea2af
parent540d33f61e0c2d057274c88b8b091525c03e4ca5
pinctrl: enhance reporting of errors when loading from DT

There are a few places in the api where the code simply returns -EINVAL when
it finds an error. An example is pinmux_map_to_setting() which now reports an
error if we try to match a group with a function that it does not support.

The reporting of errors in pinconf_check_ops and pinmux_check_ops now has the
same style and is located inside the according functions and not the calling
code.

When the map is found in the DT but the default state can not be selected we
get an error to know that the code at least tried.

The patch also removes a stray word from one comment and a "->" from another
for the sake of consistency.

Finally we replace a few pr_err/debug() calls with dev_err/dbg().

Thanks go to Stephen Warren for reviewing the patch and enhancing the reporting
inside pinmux_map_to_setting().

Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c
drivers/pinctrl/pinconf.c
drivers/pinctrl/pinmux.c