Skip to content

Commit

Permalink
drivers/gpio: Adding missing braces for XEC driver
Browse files Browse the repository at this point in the history
Even one liner if () statement should have braces.

Fixing parameter indentation as well.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  • Loading branch information
Tomasz Bursztyka authored and ioannisg committed Aug 2, 2019
1 parent 209a910 commit e555ddd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions drivers/gpio/gpio_mchp_xec.c
Expand Up @@ -36,7 +36,7 @@ struct gpio_xec_config {
}; };


static int gpio_xec_configure(struct device *dev, static int gpio_xec_configure(struct device *dev,
int access_op, u32_t pin, int flags) int access_op, u32_t pin, int flags)
{ {
const struct gpio_xec_config *config = dev->config->config_info; const struct gpio_xec_config *config = dev->config->config_info;
__IO u32_t *current_pcr1; __IO u32_t *current_pcr1;
Expand All @@ -45,8 +45,9 @@ static int gpio_xec_configure(struct device *dev,
u32_t gpio_interrupt = 0; u32_t gpio_interrupt = 0;


/* Validate pin number range in terms of current port */ /* Validate pin number range 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; return -EINVAL;
}


/* Check for an invalid pin configuration */ /* Check for an invalid pin configuration */
if ((flags & GPIO_INT) && (flags & GPIO_DIR_OUT)) { if ((flags & GPIO_INT) && (flags & GPIO_DIR_OUT)) {
Expand Down Expand Up @@ -135,7 +136,7 @@ static int gpio_xec_configure(struct device *dev,




static int gpio_xec_write(struct device *dev, static int gpio_xec_write(struct device *dev,
int access_op, u32_t pin, u32_t value) int access_op, u32_t pin, u32_t value)
{ {
const struct gpio_xec_config *config = dev->config->config_info; const struct gpio_xec_config *config = dev->config->config_info;
u32_t port_n = config->port_num; u32_t port_n = config->port_num;
Expand Down Expand Up @@ -167,7 +168,7 @@ static int gpio_xec_write(struct device *dev,
} }


static int gpio_xec_read(struct device *dev, static int gpio_xec_read(struct device *dev,
int access_op, u32_t pin, u32_t *value) int access_op, u32_t pin, u32_t *value)
{ {
const struct gpio_xec_config *config = dev->config->config_info; const struct gpio_xec_config *config = dev->config->config_info;
u32_t port_n = config->port_num; u32_t port_n = config->port_num;
Expand All @@ -187,7 +188,7 @@ static int gpio_xec_read(struct device *dev,




static int gpio_xec_manage_callback(struct device *dev, static int gpio_xec_manage_callback(struct device *dev,
struct gpio_callback *callback, bool set) struct gpio_callback *callback, bool set)
{ {
struct gpio_xec_data *data = dev->driver_data; struct gpio_xec_data *data = dev->driver_data;


Expand All @@ -197,7 +198,7 @@ static int gpio_xec_manage_callback(struct device *dev,
} }


static int gpio_xec_enable_callback(struct device *dev, static int gpio_xec_enable_callback(struct device *dev,
int access_op, u32_t pin) int access_op, u32_t pin)
{ {
struct gpio_xec_data *data = dev->driver_data; struct gpio_xec_data *data = dev->driver_data;


Expand All @@ -211,7 +212,7 @@ static int gpio_xec_enable_callback(struct device *dev,
} }


static int gpio_xec_disable_callback(struct device *dev, static int gpio_xec_disable_callback(struct device *dev,
int access_op, u32_t pin) int access_op, u32_t pin)
{ {
struct gpio_xec_data *data = dev->driver_data; struct gpio_xec_data *data = dev->driver_data;


Expand Down

0 comments on commit e555ddd

Please sign in to comment.