From: Stephen Warren Date: Tue, 14 Feb 2012 17:50:41 +0000 (-0700) Subject: pinctrl: make "hog" mapping table entries work X-Git-Tag: upstream/snapshot3+hdmi~7905^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=449d16b025ac38c7b62af5fb6ef4b833d78e690d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Stephen Warren Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index c5f76ad..8a91eb2 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -725,23 +725,11 @@ static int pinctrl_hog_map(struct pinctrl_dev *pctldev, struct pinctrl *p; int ret; - if (map->dev_name) { - /* - * TODO: the day we have device tree support, we can - * traverse the device tree and hog to specific device nodes - * without any problems, so then we can hog pinmuxes for - * all devices that just want a static pin mux at this point. - */ - dev_err(pctldev->dev, "map %s wants to hog a non-system pinmux, this is not going to work\n", - map->name); - return -EINVAL; - } - hog = kzalloc(sizeof(struct pinctrl_hog), GFP_KERNEL); if (!hog) return -ENOMEM; - p = pinctrl_get(NULL, map->name); + p = pinctrl_get(pctldev->dev, map->name); if (IS_ERR(p)) { kfree(hog); dev_err(pctldev->dev,