mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume()
commit c370bb474016ab9edfdabd7c08a88dd13a71ddbd upstream.
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a9c4e246f7
commit
7cdcaa7c76
1 changed files with 2 additions and 2 deletions
|
|
@ -1554,8 +1554,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue