gpiolib: ACPI: remove gpio_to_desc() usage
authorAlexandre Courbot <acourbot@nvidia.com>
Sun, 9 Feb 2014 08:43:55 +0000 (17:43 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Feb 2014 16:15:46 +0000 (17:15 +0100)
gpio_to_desc() must die. Replace one of its usage by the
newly-introduced gpiochip_get_desc() function.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-acpi.c

index 716ee98431102d466e4be8114837322578cfe237..b7db098ba06039845635e0c6523b8aaf6dffe8e2 100644 (file)
@@ -60,7 +60,7 @@ static struct gpio_desc *acpi_get_gpiod(char *path, int pin)
        if (pin < 0 || pin > chip->ngpio)
                return ERR_PTR(-EINVAL);
 
-       return gpio_to_desc(chip->base + pin);
+       return gpiochip_get_desc(chip, pin);
 }
 
 static irqreturn_t acpi_gpio_irq_handler(int irq, void *data)