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>
This commit is contained in:
Bartosz Golaszewski 2024-01-23 17:52:36 +01:00
parent 2559f2e092
commit b6f87adbac

View 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);