Thread (17 messages) 17 messages, 5 authors, 2021-04-01
STALE1928d

[PATCH 2/2] gpiolib: Allow drivers to return EOPNOTSUPP from config

From: Matti Vaittinen <hidden>
Date: 2021-03-29 11:42:38
Also in: lkml
Subsystem: gpio subsystem, the rest · Maintainers: Linus Walleij, Bartosz Golaszewski, Linus Torvalds

The checkpacth instructs to switch from ENOSUPP to EOPNOTSUPP.
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
Make the gpiolib allow drivers to return both so driver developers
can avoid one of the checkpatch complaints.

Signed-off-by: Matti Vaittinen <redacted>
---
 drivers/gpio/gpiolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 6367646dce83..60d61a6314b0 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2134,7 +2134,7 @@ static int gpio_set_config_with_argument_optional(struct gpio_desc *desc,
 	int ret;
 
 	ret = gpio_set_config_with_argument(desc, mode, argument);
-	if (ret != -ENOTSUPP)
+	if (ret != -ENOTSUPP && ret != -EOPNOTSUPP)
 		return ret;
 
 	switch (mode) {
-- 
2.25.4


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help