platform/x86: silicom: remove unnecessary GPIO line direction check
Subsystems (2)
PATCH v2 1/1 platform/x86: silicom: 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.
---
Changes in v2:
- remove the now unused variable
drivers/platform/x86/silicom-platform.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/platform/x86/silicom-platform.c +0 -4
@@ -248,13 +248,9 @@ static int silicom_gpio_direction_input(struct gpio_chip *gc,static int silicom_gpio_set (struct gpio_chip *gc,unsigned int offset,int value) { -int direction =silicom_gpio_get_direction (gc, offset);u8 *channels =gpiochip_get_data (gc);int channel = channels[offset]; -if (direction ==GPIO_LINE_DIRECTION_IN ) -return -EPERM ; -silicom_mec_port_set (channel, !value);return 0 ;
Signature · 1 line
2.48.1
Ilpo Järvinen
maintainerQuoted 5 lines · Bartosz Golaszewski
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.
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: silicom: remove unnecessary GPIO line direction check
commit: 5a7c909a53875e9c0c64cdf8e52b5716d8a74523
--
i.