gpio: mb86s70: Return error if requesting an already assigned gpio
PATCH 1/1 gpio: mb86s70: Return error if requesting an already assigned gpio
Signed-off-by Axel Lin <[email protected]>
--- drivers/gpio/gpio-mb86s7x.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpio/gpio-mb86s7x.c +5 -0
@@ -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));
Signature · 1 line
1.9.1
Quoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>
No answer for a month. Patch applied, let's see if someone reacts now.
Yours,
Linus Walleij