gpio: remove gpiod_lock/unlock_as_irq()
gpio_lock/unlock_as_irq() are working with (chip, offset) arguments and are thus not using the old integer namespace. Therefore, there is no reason to have gpiod variants of these functions working with descriptors, especially since the (chip, offset) tuple is more suitable to the users of these functions (GPIO drivers, whereas GPIO descriptors are targeted at GPIO consumers). Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:

committed by
Linus Walleij

parent
1bd6b601fe
commit
d74be6dfea
@@ -157,7 +157,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares,
|
||||
|
||||
gpiod_direction_input(desc);
|
||||
|
||||
ret = gpiod_lock_as_irq(desc);
|
||||
ret = gpio_lock_as_irq(chip, pin);
|
||||
if (ret) {
|
||||
dev_err(chip->dev, "Failed to lock GPIO as interrupt\n");
|
||||
goto fail_free_desc;
|
||||
@@ -212,7 +212,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares,
|
||||
fail_free_event:
|
||||
kfree(event);
|
||||
fail_unlock_irq:
|
||||
gpiod_unlock_as_irq(desc);
|
||||
gpio_unlock_as_irq(chip, pin);
|
||||
fail_free_desc:
|
||||
gpiochip_free_own_desc(desc);
|
||||
|
||||
@@ -263,7 +263,7 @@ static void acpi_gpiochip_free_interrupts(struct acpi_gpio_chip *acpi_gpio)
|
||||
desc = gpiochip_get_desc(chip, event->pin);
|
||||
if (WARN_ON(IS_ERR(desc)))
|
||||
continue;
|
||||
gpiod_unlock_as_irq(desc);
|
||||
gpio_unlock_as_irq(chip, event->pin);
|
||||
gpiochip_free_own_desc(desc);
|
||||
list_del(&event->node);
|
||||
kfree(event);
|
||||
|
Reference in New Issue
Block a user