Message ID | 20170824081934.85859-2-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers | show |
On Thu, Aug 24, 2017 at 11:19:34AM +0300, Andy Shevchenko wrote: > 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> No objections from me. Looks better this way :) Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Aug 24, 2017 at 10:19 AM, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > 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> Patch applied with Mika's ACK. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index c8675611b768..19e2bd16a301 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -767,22 +767,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)
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> --- drivers/pinctrl/intel/pinctrl-intel.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)