@@ -16,10 +16,9 @@ struct bd71828_gpio {
16
16
struct gpio_chip gpio ;
17
17
};
18
18
19
- static void bd71828_gpio_set (struct gpio_chip * chip , unsigned int offset ,
20
- int value )
19
+ static int bd71828_gpio_set (struct gpio_chip * chip , unsigned int offset ,
20
+ int value )
21
21
{
22
- int ret ;
23
22
struct bd71828_gpio * bdgpio = gpiochip_get_data (chip );
24
23
u8 val = (value ) ? BD71828_GPIO_OUT_HI : BD71828_GPIO_OUT_LO ;
25
24
@@ -28,12 +27,10 @@ static void bd71828_gpio_set(struct gpio_chip *chip, unsigned int offset,
28
27
* we are dealing with - then we are done
29
28
*/
30
29
if (offset == HALL_GPIO_OFFSET )
31
- return ;
30
+ return 0 ;
32
31
33
- ret = regmap_update_bits (bdgpio -> regmap , GPIO_OUT_REG (offset ),
34
- BD71828_GPIO_OUT_MASK , val );
35
- if (ret )
36
- dev_err (bdgpio -> dev , "Could not set gpio to %d\n" , value );
32
+ return regmap_update_bits (bdgpio -> regmap , GPIO_OUT_REG (offset ),
33
+ BD71828_GPIO_OUT_MASK , val );
37
34
}
38
35
39
36
static int bd71828_gpio_get (struct gpio_chip * chip , unsigned int offset )
@@ -112,7 +109,7 @@ static int bd71828_probe(struct platform_device *pdev)
112
109
bdgpio -> gpio .set_config = bd71828_gpio_set_config ;
113
110
bdgpio -> gpio .can_sleep = true;
114
111
bdgpio -> gpio .get = bd71828_gpio_get ;
115
- bdgpio -> gpio .set = bd71828_gpio_set ;
112
+ bdgpio -> gpio .set_rv = bd71828_gpio_set ;
116
113
bdgpio -> gpio .base = -1 ;
117
114
118
115
/*
0 commit comments