projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd3b9a4
)
gpiolib: add desc validation to gpiod_set_transitory()
author
Vladimir Zapolskiy
<vz@mleia.com>
Thu, 21 Dec 2017 16:37:35 +0000
(18:37 +0200)
committer
Linus Walleij
<linus.walleij@linaro.org>
Tue, 2 Jan 2018 08:39:17 +0000
(09:39 +0100)
The gpiod_set_transitory() function is publicly exported, and
it is expected from it to be ready for usage with optional GPIOs
on consumer's side.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpiolib.c
b/drivers/gpio/gpiolib.c
index
c23cc6b
..
7dde703
100644
(file)
--- a/
drivers/gpio/gpiolib.c
+++ b/
drivers/gpio/gpiolib.c
@@
-2526,6
+2526,7
@@
int gpiod_set_transitory(struct gpio_desc *desc, bool transitory)
int gpio;
int rc;
+ VALIDATE_DESC(desc);
/*
* Handle FLAG_TRANSITORY first, enabling queries to gpiolib for
* persistence state.