diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-04-28 13:19:06 -0400 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-04-28 13:19:06 -0400 |
commit | 5f61d9517f17069dbedb94aa71034f0a22e014ef (patch) | |
tree | 334d787e018512a3b6111d44ae248b4be97558f0 /drivers/pinctrl/intel | |
parent | a0a5f7661e1c49de0c1f93ca435ba2880b88fc5c (diff) |
pinctrl: intel: Increase readability of intel_gpio_update_pad_mode()
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>
Diffstat (limited to 'drivers/pinctrl/intel')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 1c85cc807a8f..d7acbb79cdf7 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c | |||
@@ -1555,10 +1555,12 @@ intel_gpio_is_requested(struct gpio_chip *chip, int base, unsigned int size) | |||
1555 | static u32 | 1555 | static u32 |
1556 | intel_gpio_update_pad_mode(void __iomem *hostown, u32 mask, u32 value) | 1556 | intel_gpio_update_pad_mode(void __iomem *hostown, u32 mask, u32 value) |
1557 | { | 1557 | { |
1558 | u32 curr = readl(hostown); | 1558 | u32 curr, updated; |
1559 | u32 updated = (curr & ~mask) | (value & mask); | ||
1560 | 1559 | ||
1560 | curr = readl(hostown); | ||
1561 | updated = (curr & ~mask) | (value & mask); | ||
1561 | writel(updated, hostown); | 1562 | writel(updated, hostown); |
1563 | |||
1562 | return curr; | 1564 | return curr; |
1563 | } | 1565 | } |
1564 | 1566 | ||