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>
This commit is contained in:
Andy Shevchenko 2017-08-24 11:19:34 +03:00 committed by Linus Walleij
parent cb715d0ad0
commit 8546137721
1 changed files with 12 additions and 12 deletions

View File

@ -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) static void intel_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{ {
struct intel_pinctrl *pctrl = gpiochip_get_data(chip); struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
unsigned long flags;
void __iomem *reg; void __iomem *reg;
u32 padcfg0;
reg = intel_get_padcfg(pctrl, offset, PADCFG0); reg = intel_get_padcfg(pctrl, offset, PADCFG0);
if (reg) { if (!reg)
unsigned long flags; return;
u32 padcfg0;
raw_spin_lock_irqsave(&pctrl->lock, flags); raw_spin_lock_irqsave(&pctrl->lock, flags);
padcfg0 = readl(reg); padcfg0 = readl(reg);
if (value) if (value)
padcfg0 |= PADCFG0_GPIOTXSTATE; padcfg0 |= PADCFG0_GPIOTXSTATE;
else else
padcfg0 &= ~PADCFG0_GPIOTXSTATE; padcfg0 &= ~PADCFG0_GPIOTXSTATE;
writel(padcfg0, reg); writel(padcfg0, reg);
raw_spin_unlock_irqrestore(&pctrl->lock, flags); raw_spin_unlock_irqrestore(&pctrl->lock, flags);
}
} }
static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned offset) static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned offset)