gpiolib: add desc validation to gpiod_set_transitory()
PATCH 1/1 gpiolib: add desc validation to gpiod_set_transitory()
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 <[email protected]>
--- drivers/gpio/gpiolib.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/gpiolib.c +1 -0
@@ -2546,6 +2546,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.
Signature · 1 line
2.10.2
Quoted 5 lines · Vladimir Zapolskiy
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 <[email protected]>
Patch applied.
Yours,
Linus Walleij