summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-01-23 19:52:36 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-02-12 12:50:52 +0300
commitb6f87adbacfab9001d08e56ac869e1c75734633d (patch)
tree092f86f383bc7b8a9da4f0f8139c4e876b144311
parent2559f2e09211dd4a5fde5bc5749ef4714fe38f7f (diff)
downloadlinux-b6f87adbacfab9001d08e56ac869e1c75734633d.tar.xz
gpio: remove unneeded code from gpio_device_get_desc()
The GPIO chip pointer is unused. Let's remove it. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--drivers/gpio/gpiolib.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index cfbaf47b47d2..c6966c55816a 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -184,16 +184,6 @@ EXPORT_SYMBOL_GPL(gpiochip_get_desc);
struct gpio_desc *
gpio_device_get_desc(struct gpio_device *gdev, unsigned int hwnum)
{
- struct gpio_chip *gc;
-
- /*
- * FIXME: This will be locked once we protect gdev->chip everywhere
- * with SRCU.
- */
- gc = gdev->chip;
- if (!gc)
- return ERR_PTR(-ENODEV);
-
if (hwnum >= gdev->ngpio)
return ERR_PTR(-EINVAL);