pinctrl: intel: Increase readability of intel_gpio_update_pad_mode()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 28 Apr 2019 17:19:06 +0000 (20:19 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 28 Apr 2019 17:19:06 +0000 (20:19 +0300)
We better to use usual pattern for read-modify-update,
than doing some operations in definition block.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/pinctrl/intel/pinctrl-intel.c

index 1c85cc807a8ff1e716a34634d23ad9d00dca018e..d7acbb79cdf7d43fe349293716699c9ccc88d6af 100644 (file)
@@ -1555,10 +1555,12 @@ intel_gpio_is_requested(struct gpio_chip *chip, int base, unsigned int size)
 static u32
 intel_gpio_update_pad_mode(void __iomem *hostown, u32 mask, u32 value)
 {
-       u32 curr = readl(hostown);
-       u32 updated = (curr & ~mask) | (value & mask);
+       u32 curr, updated;
 
+       curr = readl(hostown);
+       updated = (curr & ~mask) | (value & mask);
        writel(updated, hostown);
+
        return curr;
 }