diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-05-24 00:11:43 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-05-24 10:08:04 +0200 |
commit | b672a87ae5ab0704364781214bb1251b75cbef1b (patch) | |
tree | 0f262005dfb6176b751932db829614ceb4e81a4c /drivers/pinctrl | |
parent | pinctrl: stmfx: enable links creations (diff) | |
download | linux-b672a87ae5ab0704364781214bb1251b75cbef1b.tar.xz linux-b672a87ae5ab0704364781214bb1251b75cbef1b.zip |
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>
Diffstat (limited to 'drivers/pinctrl')
-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; |