aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-14 12:50:41 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-02-22 11:59:30 -0500
commit449d16b025ac38c7b62af5fb6ef4b833d78e690d (patch)
tree93afa4011913fc6817a662862cc51983c490d0ca /drivers/pinctrl
parent5c9bdc3f52d20c9bc6c2552c6d3ec5bfa4119f75 (diff)
pinctrl: make "hog" mapping table entries work
Commit 77a5988 "pinctrl: changes hog mechanism to be self-referential" modified the way "hog" entries were represented in the mapping table. However, the new representation failed some error checks in pinctrl_hog_map(). Remove the now-bogus error-check, and fix the code to solve the issue the error-check used to avoid. Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/core.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index c5f76ad5a8c5..8a91eb24eb52 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -725,23 +725,11 @@ static int pinctrl_hog_map(struct pinctrl_dev *pctldev,
725 struct pinctrl *p; 725 struct pinctrl *p;
726 int ret; 726 int ret;
727 727
728 if (map->dev_name) {
729 /*
730 * TODO: the day we have device tree support, we can
731 * traverse the device tree and hog to specific device nodes
732 * without any problems, so then we can hog pinmuxes for
733 * all devices that just want a static pin mux at this point.
734 */
735 dev_err(pctldev->dev, "map %s wants to hog a non-system pinmux, this is not going to work\n",
736 map->name);
737 return -EINVAL;
738 }
739
740 hog = kzalloc(sizeof(struct pinctrl_hog), GFP_KERNEL); 728 hog = kzalloc(sizeof(struct pinctrl_hog), GFP_KERNEL);
741 if (!hog) 729 if (!hog)
742 return -ENOMEM; 730 return -ENOMEM;
743 731
744 p = pinctrl_get(NULL, map->name); 732 p = pinctrl_get(pctldev->dev, map->name);
745 if (IS_ERR(p)) { 733 if (IS_ERR(p)) {
746 kfree(hog); 734 kfree(hog);
747 dev_err(pctldev->dev, 735 dev_err(pctldev->dev,