pinctrl: ralink: pinctrl-rt2880: avoid to error in calls if pin is already enabled
Subsystems (2)
PATCH v2 1/1 pinctrl: ralink: pinctrl-rt2880: avoid to error in calls if pin is already enabled
In 'rt2880_pmx_group_enable' driver is printing an error and returning -EBUSY if a pin has been already enabled. This becomes in 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 don't confuse the user with a real bad problem.
---
Changes in v2:
- Fix commit message s/is/if
drivers/pinctrl/ralink/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/ralink/pinctrl-rt2880.c +1 -1
@@ -127,7 +127,7 @@ static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev,if (p->groups[group].enabled) {dev_err (p->dev,"%s is already enabled\n" , p->groups[group].name); -return -EBUSY ; +return 0 ; } p->groups[group].enabled =1 ;
Signature · 1 line
2.25.1
Quoted 7 lines · Sergio Paracuellos
In '
rt2880_pmx_group_enable' driver is printing an error and returning-EBUSYif a pin has been already enabled. This becomes in 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
Quoted 8 lines
To avoid this just print the already enabled message in the pinctrl driver and return 0 instead to don't confuse the user with a real bad problem.
Signed-off-by Sergio Paracuellos <[email protected]>---
Changes in v2:
- Fix commit message s/is/if
I just fixed up the commit manually instead, no big deal.
Thanks!
Linus Walleij
Hi Linus,
Quoted 15 lines · Linus Walleij
Quoted 11 lines · Sergio Paracuellos
In '
rt2880_pmx_group_enable' driver is printing an error and returning-EBUSYif a pin has been already enabled. This becomes in 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 backTo avoid this just print the already enabled message in the pinctrl driver and return 0 instead to don't confuse the user with a real bad problem.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Sergio Paracuellos <[email protected]>---
Changes in v2:
- Fix commit message s/is/ifI just fixed up the commit manually instead, no big deal.
Oh, I see :)
Thanks!!
Sergio Paracuellos
Quoted 3 lines
Thanks!
Linus Walleij