staging: greybus: remove unnecessary GPIO line direction check
Subsystems (3)
PATCH 1/1 staging: greybus: remove unnecessary GPIO line direction check
From: Bartosz Golaszewski <[email protected]>
As of commit 92ac7de3175e3 ("gpiolib: don't allow setting values on input lines"), the GPIO core makes sure values cannot be set on input lines. Remove the unnecessary check.
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/staging/greybus/gpio.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/greybus/gpio.c +0 -6
@@ -192,12 +192,6 @@ static int gb_gpio_set_value_operation(struct gb_gpio_controller *ggc,struct gb_gpio_set_value_request request;int ret; -if (ggc->lines[which].direction ==1 ) { -dev_warn (dev,"refusing to set value of input gpio %u\n" , - which); -return -EPERM ; - } - request.which = which; request.value = value_high ?1 :0 ; ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_VALUE,
Signature · 1 line
2.48.1
Hey Bartosz,
Thanks for the patch.
Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
As of commit
92ac7de3175e3("gpiolib: don't allow setting values on input lines"), the GPIO core makes sure values cannot be set on input lines. Remove the unnecessary check.Signed-off-by Bartosz Golaszewski <[email protected]>
LGTM.
Reviewed-by Rui Miguel Silva <[email protected]>
Cheers,
Rui
Quoted 23 lines
--- drivers/staging/greybus/gpio.c | 6 ------ 1 file changed, 6 deletions(-)drivers/staging/greybus/gpio.c +0
-6@@ -192,12 +192,6 @@ static int gb_gpio_set_value_operation(struct gb_gpio_controller *ggc,struct gb_gpio_set_value_request request;int ret; -if (ggc->lines[which].direction ==1 ) { -dev_warn (dev,"refusing to set value of input gpio %u\n" , - which); -return -EPERM ; - } - request.which = which; request.value = value_high ?1 :0 ; ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_VALUE,Signature · 1 line
2.48.1