提交 449d16b0 编写于 作者: S Stephen Warren 提交者: Linus Walleij

pinctrl: make "hog" mapping table entries work

Commit 77a59883 "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: NDong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 5c9bdc3f
...@@ -725,23 +725,11 @@ static int pinctrl_hog_map(struct pinctrl_dev *pctldev, ...@@ -725,23 +725,11 @@ static int pinctrl_hog_map(struct pinctrl_dev *pctldev,
struct pinctrl *p; struct pinctrl *p;
int ret; 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); hog = kzalloc(sizeof(struct pinctrl_hog), GFP_KERNEL);
if (!hog) if (!hog)
return -ENOMEM; return -ENOMEM;
p = pinctrl_get(NULL, map->name); p = pinctrl_get(pctldev->dev, map->name);
if (IS_ERR(p)) { if (IS_ERR(p)) {
kfree(hog); kfree(hog);
dev_err(pctldev->dev, dev_err(pctldev->dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册