gpio: wcove: Use -ENOTSUPP consistently
Subsystems (3)
PATCH 1/1 gpio: wcove: Use -ENOTSUPP consistently
The GPIO library expects the drivers to return -ENOTSUPP in some cases and not using analogue POSIX code. Make the driver to follow this.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/gpio/gpio-wcove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-wcove.c +1 -1
@@ -104,7 +104,7 @@ static inline int to_reg(int gpio, enum ctrl_register type)unsigned int reg = type ==CTRL_IN ?GPIO_IN_CTRL_BASE :GPIO_OUT_CTRL_BASE ;if (gpio >=WCOVE_GPIO_NUM ) -return -EOPNOTSUPP ; +return -ENOTSUPP ;return reg + gpio; }
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Quoted 6 lines · Andy Shevchenko
The GPIO library expects the drivers to return
-ENOTSUPPin some cases and not using analogue POSIX code. Make the driver to follow this.Signed-off-by Andy Shevchenko <[email protected]>---
Looks good to me.
Reviewed-by Kuppuswamy Sathyanarayanan <[email protected]>
Quoted 16 lines
drivers/gpio/gpio-wcove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-wcove.c +1
-1@@ -104,7 +104,7 @@ static inline int to_reg(int gpio, enum ctrl_register type)unsigned int reg = type ==CTRL_IN ?GPIO_IN_CTRL_BASE :GPIO_OUT_CTRL_BASE ;if (gpio >=WCOVE_GPIO_NUM ) -return -EOPNOTSUPP ; +return -ENOTSUPP ;return reg + gpio; }
Signature · 2 lines
Sathyanarayanan Kuppuswamy Linux Kernel Developer
Quoted 6 lines · Kuppuswamy Sathyanarayanan
Quoted 4 lines · Andy Shevchenko
The GPIO library expects the drivers to return
-ENOTSUPPin some cases and not using analogue POSIX code. Make the driver to follow this.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Andy Shevchenko <[email protected]>---
Looks good to me.
Reviewed-by Kuppuswamy Sathyanarayanan <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko