diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-01-09 16:58:34 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:53:29 +0100 |
commit | 36e96c6d7269490520fc35bc677e65a9e6df1f4f (patch) | |
tree | fb7175c4b80cdfbfb50912e40181d28ee99d2afd /include/gpiod.h | |
parent | b0935828445ba148cc19f5cea284e8e962f020da (diff) | |
download | barebox-36e96c6d7269490520fc35bc677e65a9e6df1f4f.tar.gz |
gpiolib: use signed int for gpio in gpiod_set_value
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@pengutronix.de>
Link: https://lore.barebox.org/20230109155836.2220277-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/gpiod.h')
-rw-r--r-- | include/gpiod.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gpiod.h b/include/gpiod.h index 32180337dc..cc3fb966a0 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); |