Current code hold port->lock spinlock and then try to grab the lock again
in adi_gpio_set_value(). Fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
struct gpio_port_t *regs = port->regs;
unsigned long flags;
+ adi_gpio_set_value(chip, offset, value);
+
spin_lock_irqsave(&port->lock, flags);
writew(readw(®s->inen) & ~(1 << offset), ®s->inen);
- adi_gpio_set_value(chip, offset, value);
writew(1 << offset, ®s->dir_set);
spin_unlock_irqrestore(&port->lock, flags);