diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-02-20 01:45:53 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-02-22 11:59:34 -0500 |
commit | b1eed4ece7064c361d6e03f6706d90e4e9dd7e96 (patch) | |
tree | 10dfd6a834d180a7a0eaa3515bf78fdf97de65d3 | |
parent | f026fe3d102e9d7f0d040109353ef5a97b5ef92c (diff) |
pinctrl: error if mapping table's control dev can't be found
This is a serious error, and the pin control system will not function
correctly if it ends up not programing the mapping table entries into
the HW. Instead of just ignoring this, error out.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
[rebased to fit the applied patch series, cast error to pointer]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/core.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index e2d4abb29d1a..fb3fbb76932e 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c | |||
@@ -518,13 +518,12 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name) | |||
518 | */ | 518 | */ |
519 | pctldev = get_pinctrl_dev_from_devname(map->ctrl_dev_name); | 519 | pctldev = get_pinctrl_dev_from_devname(map->ctrl_dev_name); |
520 | if (!pctldev) { | 520 | if (!pctldev) { |
521 | pr_warning("could not find a pinctrl device for pinmux function %s, fishy, they shall all have one\n", | 521 | dev_err(dev, "unknown pinctrl device %s in map entry", |
522 | map->function); | 522 | map->ctrl_dev_name); |
523 | pr_warning("given pinctrl device name: %s", | 523 | pinmux_put(p); |
524 | map->ctrl_dev_name); | 524 | kfree(p); |
525 | 525 | /* Eventually, this should trigger deferred probe */ | |
526 | /* Continue to check the other mappings anyway... */ | 526 | return ERR_PTR(-ENODEV); |
527 | continue; | ||
528 | } | 527 | } |
529 | 528 | ||
530 | pr_debug("in map, found pctldev %s to handle function %s", | 529 | pr_debug("in map, found pctldev %s to handle function %s", |