summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-06-10 17:20:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 17:32:37 +0200
commit1b30f644f7e2b8d4352b7a796496c41f81aa72ed (patch)
treed2f766562aaa44b2efc0889c81cd83932ff9e1e7
parentb8394732ff0cc81551b0e3b442994622ebf389a7 (diff)
staging: greybus: remove unnecessary GPIO line direction check
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 <bartosz.golaszewski@linaro.org> Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org> Link: https://lore.kernel.org/r/20250610152036.86099-1-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/greybus/gpio.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c
index f81c34160f72..1280530c8987 100644
--- a/drivers/staging/greybus/gpio.c
+++ b/drivers/staging/greybus/gpio.c
@@ -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,