From: Bartosz Golaszewski Date: Tue, 23 Jan 2024 16:52:36 +0000 (+0100) Subject: gpio: remove unneeded code from gpio_device_get_desc() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b6f87adbacfab9001d08e56ac869e1c75734633d;p=linux.git gpio: remove unneeded code from gpio_device_get_desc() The GPIO chip pointer is unused. Let's remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Acked-by: Andy Shevchenko --- diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index cfbaf47b47d26..c6966c55816a9 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);