summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-bd71828.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-bd71828.c')
-rw-r--r--drivers/gpio/gpio-bd71828.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-bd71828.c b/drivers/gpio/gpio-bd71828.c
index b2ccc320c7b5..e439dbfffc62 100644
--- a/drivers/gpio/gpio-bd71828.c
+++ b/drivers/gpio/gpio-bd71828.c
@@ -16,10 +16,9 @@ struct bd71828_gpio {
struct gpio_chip gpio;
};
-static void bd71828_gpio_set(struct gpio_chip *chip, unsigned int offset,
- int value)
+static int bd71828_gpio_set(struct gpio_chip *chip, unsigned int offset,
+ int value)
{
- int ret;
struct bd71828_gpio *bdgpio = gpiochip_get_data(chip);
u8 val = (value) ? BD71828_GPIO_OUT_HI : BD71828_GPIO_OUT_LO;
@@ -28,12 +27,10 @@ static void bd71828_gpio_set(struct gpio_chip *chip, unsigned int offset,
* we are dealing with - then we are done
*/
if (offset == HALL_GPIO_OFFSET)
- return;
+ return 0;
- ret = regmap_update_bits(bdgpio->regmap, GPIO_OUT_REG(offset),
- BD71828_GPIO_OUT_MASK, val);
- if (ret)
- dev_err(bdgpio->dev, "Could not set gpio to %d\n", value);
+ return regmap_update_bits(bdgpio->regmap, GPIO_OUT_REG(offset),
+ BD71828_GPIO_OUT_MASK, val);
}
static int bd71828_gpio_get(struct gpio_chip *chip, unsigned int offset)