You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume()
commitc370bb4740upstream. 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:e2f3cf18c3("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c56c801391
commit
cfa79faf7e
@@ -1645,8 +1645,8 @@ int __maybe_unused stm32_pinctrl_resume(struct device *dev)
|
||||
struct stm32_pinctrl_group *g = pctl->groups;
|
||||
int i;
|
||||
|
||||
for (i = g->pin; i < g->pin + pctl->ngroups; i++)
|
||||
stm32_pinctrl_restore_gpio_regs(pctl, i);
|
||||
for (i = 0; i < pctl->ngroups; i++, g++)
|
||||
stm32_pinctrl_restore_gpio_regs(pctl, g->pin);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user