Skip to content
Permalink
Browse files

driver/pinumx: Adding missing braces for XEC driver

Even one liner if () statement should have braces.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  • Loading branch information...
tbursztyka authored and ioannisg committed Aug 2, 2019
1 parent e555ddd commit d93b0f3e6ad38768afa00a53c3bb5fce1fc12e17
Showing with 4 additions and 2 deletions.
  1. +4 −2 drivers/pinmux/pinmux_mchp_xec.c
@@ -31,8 +31,9 @@ static int pinmux_xec_set(struct device *dev, u32_t pin, u32_t func)
u32_t mask = 0;

/* Validate pin number in terms of current port */
if ((valid_ctrl_masks[config->port_num] & BIT(pin)) == 0)
if ((valid_ctrl_masks[config->port_num] & BIT(pin)) == 0) {
return -EINVAL;
}

mask |= MCHP_GPIO_CTRL_BUFT_MASK | MCHP_GPIO_CTRL_MUX_MASK;

@@ -81,8 +82,9 @@ static int pinmux_xec_get(struct device *dev, u32_t pin, u32_t *func)
__IO u32_t *current_pcr1;

/* Validate pin number in terms of current port */
if ((valid_ctrl_masks[config->port_num] & BIT(pin)) == 0)
if ((valid_ctrl_masks[config->port_num] & BIT(pin)) == 0) {
return -EINVAL;
}

current_pcr1 = config->pcr1_base + pin;
*func = *current_pcr1 & (MCHP_GPIO_CTRL_BUFT_MASK

0 comments on commit d93b0f3

Please sign in to comment.
You can’t perform that action at this time.