All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFT] gpio: mb86s70: Return error if requesting an already assigned gpio
@ 2015-01-30 10:26 Axel Lin
  2015-03-02 14:36 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-01-30 10:26 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot
  Cc: Jassi Brar, Andy Green, Vincent Yang, Tetsuya Nuriya, linux-gpio

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/gpio/gpio-mb86s7x.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpio/gpio-mb86s7x.c b/drivers/gpio/gpio-mb86s7x.c
index 21b1ce5..ee93c0a 100644
--- a/drivers/gpio/gpio-mb86s7x.c
+++ b/drivers/gpio/gpio-mb86s7x.c
@@ -58,6 +58,11 @@ static int mb86s70_gpio_request(struct gpio_chip *gc, unsigned gpio)
 	spin_lock_irqsave(&gchip->lock, flags);
 
 	val = readl(gchip->base + PFR(gpio));
+	if (!(val & OFFSET(gpio))) {
+		spin_unlock_irqrestore(&gchip->lock, flags);
+		return -EINVAL;
+	}
+
 	val &= ~OFFSET(gpio);
 	writel(val, gchip->base + PFR(gpio));
 
-- 
1.9.1




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

* Re: [PATCH RFT] gpio: mb86s70: Return error if requesting an already assigned gpio
  2015-01-30 10:26 [PATCH RFT] gpio: mb86s70: Return error if requesting an already assigned gpio Axel Lin
@ 2015-03-02 14:36 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2015-03-02 14:36 UTC (permalink / raw)
  To: Axel Lin
  Cc: Alexandre Courbot, Jassi Brar, Andy Green, Vincent Yang,
	Tetsuya Nuriya, linux-gpio

On Fri, Jan 30, 2015 at 11:26 AM, Axel Lin <axel.lin@ingics.com> wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>

No answer for a month. Patch applied, let's see if
someone reacts now.

Yours,
Linus Walleij

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

end of thread, other threads:[~2015-03-02 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 10:26 [PATCH RFT] gpio: mb86s70: Return error if requesting an already assigned gpio Axel Lin
2015-03-02 14:36 ` 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.