pinctrl: ralink: rt2880: avoid to error in calls is pin is already enabled
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 4 Jun 2021 05:53:37 +0000 (07:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jun 2021 12:42:49 +0000 (14:42 +0200)
commit5bd6bcb3532d91396f770584428d2b88945f671e
tree086123c0ed04e1c739481ce5cf8d296dcba8b30f
parent6d0dc1b34c0235c069055ee7bc808870e5815346
pinctrl: ralink: rt2880: avoid to error in calls is pin is already enabled

[ Upstream commit eb367d875f94a228c17c8538e3f2efcf2eb07ead ]

In 'rt2880_pmx_group_enable' driver is printing an error and returning
-EBUSY if a pin has been already enabled. This begets anoying messages
in the caller when this happens like the following:

rt2880-pinmux pinctrl: pcie is already enabled
mt7621-pci 1e140000.pcie: Error applying setting, reverse things back

To avoid this just print the already enabled message in the pinctrl
driver and return 0 instead to not confuse the user with a real
bad problem.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210604055337.20407-1-sergio.paracuellos@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c