]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: do not init debugfs entries for unimplemented functionalities
authorFlorian Vaussard <florian.vaussard@epfl.ch>
Wed, 5 Feb 2014 06:51:22 +0000 (07:51 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 6 Feb 2014 12:48:17 +0000 (13:48 +0100)
commit8046a21e2cded66b3c1aaa84bfc50fc6a78df1dd
tree502ef3bb1342dc7b23553684b12103188c367639
parent90c90ecff62d944a0344a904f357f0e79ef09cf0
pinctrl: do not init debugfs entries for unimplemented functionalities

Commit 82a7817 "pinctrl: pinconf: remove checks on ops->pin_config_get"
removed the check on (ops != NULL) when performing pinconf_pins_show() or
pinconf_groups_show(). As these entries are always enabled, even if
pinconf is not supported, reading will result in an oops due to NULL
ops.

Instead of checking for ops, remove the corresponding debugfs entries if
pinconf and/or pinmux are not implemented.

Tested on OMAP3 (pinctrl-single).

Cc: stable@vger.kernel.org
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c