Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH v1 1/1] gpio: wcove: Use -ENOTSUPP consistently
@ 2024-04-05 16:25 Andy Shevchenko
  2024-04-05 16:46 ` Kuppuswamy Sathyanarayanan
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2024-04-05 16:25 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel
  Cc: Kuppuswamy Sathyanarayanan, Andy Shevchenko, Linus Walleij,
	Bartosz Golaszewski, Cristian Marussi, Sudeep Holla, peng.fan

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 <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-wcove.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-wcove.c b/drivers/gpio/gpio-wcove.c
index c18b6b47384f..94ca9d03c094 100644
--- a/drivers/gpio/gpio-wcove.c
+++ b/drivers/gpio/gpio-wcove.c
@@ -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;
 }
-- 
2.43.0.rc1.1.gbec44491f096


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-05 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 16:25 [PATCH v1 1/1] gpio: wcove: Use -ENOTSUPP consistently Andy Shevchenko
2024-04-05 16:46 ` Kuppuswamy Sathyanarayanan
2024-04-05 17:11   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox