pinctrl: adi2: Fix dead lock in adi_gpio_direction_output
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>
This commit is contained in:
Родитель
c8690d6d29
Коммит
fe4315c3b0
|
@ -776,10 +776,11 @@ static int adi_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
|
|||
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче