summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-adi2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinctrl-adi2.c')
-rw-r--r--drivers/pinctrl/pinctrl-adi2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c
index f2aa8773f4e3..8089fda00427 100644
--- a/drivers/pinctrl/pinctrl-adi2.c
+++ b/drivers/pinctrl/pinctrl-adi2.c
@@ -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(&regs->inen) & ~(1 << offset), &regs->inen);
- adi_gpio_set_value(chip, offset, value);
writew(1 << offset, &regs->dir_set);
spin_unlock_irqrestore(&port->lock, flags);
OpenPOWER on IntegriCloud