* FAILED: patch "[PATCH] gpio: fix getting nonexclusive gpiods from DT" failed to apply to 5.3-stable tree
@ 2019-10-14 14:58 gregkh
2019-10-14 15:33 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2019-10-14 14:58 UTC (permalink / raw)
To: m.felsch, bgolaszewski; +Cc: stable
The patch below does not apply to the 5.3-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From be7ae45cfea97e787234e00e1a9eb341acacd84e Mon Sep 17 00:00:00 2001
From: Marco Felsch <m.felsch@pengutronix.de>
Date: Tue, 1 Oct 2019 11:49:21 +0200
Subject: [PATCH] gpio: fix getting nonexclusive gpiods from DT
Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT
nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios.
Currently the gpiolib uses the wrong flags variable for the check. We
need to check the gpiod_flags instead of the of_gpio_flags else we
return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested
gpiod's.
Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes
Cc: stable@vger.kernel.org
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
[Bartosz: the function was moved to gpiolib-of.c so updated the patch]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 1eea2c6c2e1d..80ea49f570f4 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -317,7 +317,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
transitory = flags & OF_GPIO_TRANSITORY;
ret = gpiod_request(desc, label);
- if (ret == -EBUSY && (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
+ if (ret == -EBUSY && (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
return desc;
if (ret)
return ERR_PTR(ret);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: FAILED: patch "[PATCH] gpio: fix getting nonexclusive gpiods from DT" failed to apply to 5.3-stable tree
2019-10-14 14:58 FAILED: patch "[PATCH] gpio: fix getting nonexclusive gpiods from DT" failed to apply to 5.3-stable tree gregkh
@ 2019-10-14 15:33 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2019-10-14 15:33 UTC (permalink / raw)
To: Greg KH; +Cc: Marco Felsch, Stable # 4 . 20+
pon., 14 paź 2019 o 16:58 <gregkh@linuxfoundation.org> napisał(a):
>
>
> The patch below does not apply to the 5.3-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> From be7ae45cfea97e787234e00e1a9eb341acacd84e Mon Sep 17 00:00:00 2001
> From: Marco Felsch <m.felsch@pengutronix.de>
> Date: Tue, 1 Oct 2019 11:49:21 +0200
> Subject: [PATCH] gpio: fix getting nonexclusive gpiods from DT
>
> Since commit ec757001c818 ("gpio: Enable nonexclusive gpiods from DT
> nodes") we are able to get GPIOD_FLAGS_BIT_NONEXCLUSIVE marked gpios.
> Currently the gpiolib uses the wrong flags variable for the check. We
> need to check the gpiod_flags instead of the of_gpio_flags else we
> return -EBUSY for GPIOD_FLAGS_BIT_NONEXCLUSIVE marked and requested
> gpiod's.
>
> Fixes: ec757001c818 gpio: Enable nonexclusive gpiods from DT nodes
> Cc: stable@vger.kernel.org
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> [Bartosz: the function was moved to gpiolib-of.c so updated the patch]
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
> index 1eea2c6c2e1d..80ea49f570f4 100644
> --- a/drivers/gpio/gpiolib-of.c
> +++ b/drivers/gpio/gpiolib-of.c
> @@ -317,7 +317,7 @@ struct gpio_desc *gpiod_get_from_of_node(struct device_node *node,
> transitory = flags & OF_GPIO_TRANSITORY;
>
> ret = gpiod_request(desc, label);
> - if (ret == -EBUSY && (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> + if (ret == -EBUSY && (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE))
> return desc;
> if (ret)
> return ERR_PTR(ret);
>
Hi Greg,
this and other GPIO patches can't be applied because the relevant code
has been moved a lot during the merge window. I'll send backports
shortly.
Bart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-14 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-14 14:58 FAILED: patch "[PATCH] gpio: fix getting nonexclusive gpiods from DT" failed to apply to 5.3-stable tree gregkh
2019-10-14 15:33 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).