Commit b6f87adb authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

gpio: remove unneeded code from gpio_device_get_desc()



The GPIO chip pointer is unused. Let's remove it.

Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 2559f2e0
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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);