Skip to content

Commit b672a87

Browse files
committed
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent c6045b4 commit b672a87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/pinctrl/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,9 @@ static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
12711271
goto unapply_new_state;
12721272
}
12731273

1274-
pinctrl_link_add(setting->pctldev, p->dev);
1274+
/* Do not link hogs (circular dependency) */
1275+
if (p != setting->pctldev->p)
1276+
pinctrl_link_add(setting->pctldev, p->dev);
12751277
}
12761278

12771279
p->state = state;

0 commit comments

Comments
 (0)