diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-05-24 01:11:43 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-05-24 11:08:04 +0300 |
commit | b672a87ae5ab0704364781214bb1251b75cbef1b (patch) | |
tree | 0f262005dfb6176b751932db829614ceb4e81a4c | |
parent | c6045b4e3cadc2d8d65be8601deb76811e08a6ce (diff) | |
download | linux-b672a87ae5ab0704364781214bb1251b75cbef1b.tar.xz |
pinctrl: core: Do not add device links for hogs
Hogs would create circular device links, so do not link
the device to itself.
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index d757c51d7114..41adb4e47dc0 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1271,7 +1271,9 @@ static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state) goto unapply_new_state; } - pinctrl_link_add(setting->pctldev, p->dev); + /* Do not link hogs (circular dependency) */ + if (p != setting->pctldev->p) + pinctrl_link_add(setting->pctldev, p->dev); } p->state = state; |