[PATCH 2/4] gpiolib: use signed int for gpio in gpiod_set_value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



barebox gpio identifiers are always in the range of non-negative
signed integers with negative values reserved for errors.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 include/gpiod.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/gpiod.h b/include/gpiod.h
index 32180337dc2d..cc3fb966a010 100644
--- a/include/gpiod.h
+++ b/include/gpiod.h
@@ -23,7 +23,7 @@ enum gpiod_flags {
 /* returned gpio descriptor can be passed to any normal gpio_* function */
 int gpiod_get(struct device *dev, const char *_con_id, enum gpiod_flags flags);
 
-static inline void gpiod_set_value(unsigned gpio, bool value)
+static inline void gpiod_set_value(int gpio, bool value)
 {
 	if (gpio != -ENOENT)
 		gpio_direction_active(gpio, value);
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux