diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-08-24 11:19:34 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-08-31 15:46:36 +0300 |
commit | 8546137721a9f8bb0fe99d89558628f17344ad5c (patch) | |
tree | c0a8694b1acd49008100b6fcd8a0db99d0ee3ebc /drivers/pinctrl | |
parent | cb715d0ad0ed8cbbf39a7fec303e9b6fa7fe6502 (diff) | |
download | linux-8546137721a9f8bb0fe99d89558628f17344ad5c.tar.xz |
pinctrl: intel: Decrease indentation in intel_gpio_set()
Decrease indentation in intel_gpio_set() to make it looking slightly better
and be in align with intel_gpio_get().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 8f8721538616..ac806891ff81 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -762,22 +762,22 @@ static int intel_gpio_get(struct gpio_chip *chip, unsigned offset) static void intel_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { struct intel_pinctrl *pctrl = gpiochip_get_data(chip); + unsigned long flags; void __iomem *reg; + u32 padcfg0; reg = intel_get_padcfg(pctrl, offset, PADCFG0); - if (reg) { - unsigned long flags; - u32 padcfg0; + if (!reg) + return; - raw_spin_lock_irqsave(&pctrl->lock, flags); - padcfg0 = readl(reg); - if (value) - padcfg0 |= PADCFG0_GPIOTXSTATE; - else - padcfg0 &= ~PADCFG0_GPIOTXSTATE; - writel(padcfg0, reg); - raw_spin_unlock_irqrestore(&pctrl->lock, flags); - } + raw_spin_lock_irqsave(&pctrl->lock, flags); + padcfg0 = readl(reg); + if (value) + padcfg0 |= PADCFG0_GPIOTXSTATE; + else + padcfg0 &= ~PADCFG0_GPIOTXSTATE; + writel(padcfg0, reg); + raw_spin_unlock_irqrestore(&pctrl->lock, flags); } static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned offset) |