pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume()

When resuming from low power, the driver attempts to restore the
configuration of some pins. This is done by a call to:
stm32_pinctrl_restore_gpio_regs(struct stm32_pinctrl *pctl, u32 pin)
where 'pin' must be a valid pin value (i.e. matching some 'groups->pin').
Fix the current implementation which uses some wrong 'pin' value.

Fixes: e2f3cf18c3e2 ("pinctrl: stm32: add suspend/resume management")
Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
Link: https://lore.kernel.org/r/20211008122517.617633-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by Fabien Dessenne and committed by Linus Walleij c370bb47 6dba4bdf

+2 -2
+2 -2
drivers/pinctrl/stm32/pinctrl-stm32.c
··· 1644 1644 struct stm32_pinctrl_group *g = pctl->groups; 1645 1645 int i; 1646 1646 1647 - for (i = g->pin; i < g->pin + pctl->ngroups; i++) 1648 - stm32_pinctrl_restore_gpio_regs(pctl, i); 1647 + for (i = 0; i < pctl->ngroups; i++, g++) 1648 + stm32_pinctrl_restore_gpio_regs(pctl, g->pin); 1649 1649 1650 1650 return 0; 1651 1651 }