All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpiolib: add desc validation to gpiod_set_transitory()
@ 2017-12-21 16:37 Vladimir Zapolskiy
  2018-01-02  8:39 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Zapolskiy @ 2017-12-21 16:37 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio

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>
---
 drivers/gpio/gpiolib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 6e19385..a34ea9d 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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.
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpiolib: add desc validation to gpiod_set_transitory()
  2017-12-21 16:37 [PATCH] gpiolib: add desc validation to gpiod_set_transitory() Vladimir Zapolskiy
@ 2018-01-02  8:39 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2018-01-02  8:39 UTC (permalink / raw)
  To: Vladimir Zapolskiy; +Cc: linux-gpio

On Thu, Dec 21, 2017 at 5:37 PM, Vladimir Zapolskiy <vz@mleia.com> wrote:

> 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>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-02  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-21 16:37 [PATCH] gpiolib: add desc validation to gpiod_set_transitory() Vladimir Zapolskiy
2018-01-02  8:39 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.