]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
pinctrl: do not defer device tree hogs
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 11 Jan 2013 20:22:36 +0000 (21:22 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 11 Jan 2013 20:49:21 +0000 (21:49 +0100)
commit af1024e0f7cde9023ddd0f3116db03911d5914c0
"pinctrl: skip deferral of hogs"

Attempts to avoid probe deferral on hogged pins, but we
forgot the device tree case. This patch fixes this.

Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/devicetree.c

index fe2d1af7cfa0d0bce2eeb8a8391a4567da70bdd8..fd40a11ad645a38e9a82739c9d0aaa58124db0d0 100644 (file)
@@ -141,6 +141,11 @@ static int dt_to_map_one_config(struct pinctrl *p, const char *statename,
                pctldev = find_pinctrl_by_of_node(np_pctldev);
                if (pctldev)
                        break;
+               /* Do not defer probing of hogs (circular loop) */
+               if (np_pctldev == p->dev->of_node) {
+                       of_node_put(np_pctldev);
+                       return -ENODEV;
+               }
        }
        of_node_put(np_pctldev);