Commit b1eed4ec authored by Stephen Warren's avatar Stephen Warren Committed by Linus Walleij

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: default avatarStephen Warren <swarren@nvidia.com>
[rebased to fit the applied patch series, cast error to pointer]
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f026fe3d
...@@ -518,13 +518,12 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name) ...@@ -518,13 +518,12 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name)
*/ */
pctldev = get_pinctrl_dev_from_devname(map->ctrl_dev_name); pctldev = get_pinctrl_dev_from_devname(map->ctrl_dev_name);
if (!pctldev) { if (!pctldev) {
pr_warning("could not find a pinctrl device for pinmux function %s, fishy, they shall all have one\n", dev_err(dev, "unknown pinctrl device %s in map entry",
map->function); map->ctrl_dev_name);
pr_warning("given pinctrl device name: %s", pinmux_put(p);
map->ctrl_dev_name); kfree(p);
/* Eventually, this should trigger deferred probe */
/* Continue to check the other mappings anyway... */ return ERR_PTR(-ENODEV);
continue;
} }
pr_debug("in map, found pctldev %s to handle function %s", pr_debug("in map, found pctldev %s to handle function %s",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment