Skip to content

Commit

Permalink
pinctrl: intel: Increase readability of intel_gpio_update_pad_mode()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
andy-shev committed Apr 28, 2019
1 parent a0a5f76 commit 5f61d95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/pinctrl/intel/pinctrl-intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5f61d95

Please sign in to comment.