aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-sysfs.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-07-22 03:17:42 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-07-23 11:43:24 -0400
commitd74be6dfea1b96cfb4bd79d9254fa9d21ed5f131 (patch)
tree376ed1e1d51a70262f825af17eee4eb56e363666 /drivers/gpio/gpiolib-sysfs.c
parent1bd6b601fe196b6fbce2c93536ce0f3f53577cec (diff)
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>
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
-rw-r--r--drivers/gpio/gpiolib-sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index f150aa288fa1..be45a9283c28 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -161,7 +161,7 @@ static int gpio_setup_irq(struct gpio_desc *desc, struct device *dev,
161 desc->flags &= ~GPIO_TRIGGER_MASK; 161 desc->flags &= ~GPIO_TRIGGER_MASK;
162 162
163 if (!gpio_flags) { 163 if (!gpio_flags) {
164 gpiod_unlock_as_irq(desc); 164 gpio_unlock_as_irq(desc->chip, gpio_chip_hwgpio(desc));
165 ret = 0; 165 ret = 0;
166 goto free_id; 166 goto free_id;
167 } 167 }
@@ -200,7 +200,7 @@ static int gpio_setup_irq(struct gpio_desc *desc, struct device *dev,
200 if (ret < 0) 200 if (ret < 0)
201 goto free_id; 201 goto free_id;
202 202
203 ret = gpiod_lock_as_irq(desc); 203 ret = gpio_lock_as_irq(desc->chip, gpio_chip_hwgpio(desc));
204 if (ret < 0) { 204 if (ret < 0) {
205 gpiod_warn(desc, "failed to flag the GPIO for IRQ\n"); 205 gpiod_warn(desc, "failed to flag the GPIO for IRQ\n");
206 goto free_id; 206 goto free_id;