mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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:
parent
2559f2e092
commit
b6f87adbac
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user