gpio: remove unneeded code from gpio_device_get_desc()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 23 Jan 2024 16:52:36 +0000 (17:52 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 12 Feb 2024 09:50:52 +0000 (10:50 +0100)
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>
drivers/gpio/gpiolib.c

index cfbaf47b47d26d9944ee5c027e2934433952e776..c6966c55816a92f75f207fac704e03ae940e2f64 100644 (file)
@@ -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);