linux-mips
[Top] [All Lists]

[PATCH 3/6] MIPS: lantiq: use devm_request_gpio inside falcon gpio drive

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 3/6] MIPS: lantiq: use devm_request_gpio inside falcon gpio driver
From: John Crispin <blogic@openwrt.org>
Date: Fri, 17 Feb 2012 11:32:48 +0100
Cc: linux-mips@linux-mips.org, John Crispin <blogic@openwrt.org>
In-reply-to: <1329474771-20874-1-git-send-email-blogic@openwrt.org>
References: <1329474771-20874-1-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
Start using the devm_request_gpio() api inside our falcon gpio_request wrapper.

Signed-off-by: John Crispin <blogic@openwrt.org>
---
 arch/mips/lantiq/falcon/gpio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/lantiq/falcon/gpio.c b/arch/mips/lantiq/falcon/gpio.c
index 3eebd51..b7611d7 100644
--- a/arch/mips/lantiq/falcon/gpio.c
+++ b/arch/mips/lantiq/falcon/gpio.c
@@ -97,7 +97,7 @@ int ltq_gpio_mux_set(unsigned int pin, unsigned int mux)
 }
 EXPORT_SYMBOL(ltq_gpio_mux_set);
 
-int ltq_gpio_request(unsigned int pin, unsigned int mux,
+int ltq_gpio_request(struct device *dev, unsigned int pin, unsigned int mux,
                        unsigned int dir, const char *name)
 {
        int port = pin / 100;
@@ -106,7 +106,7 @@ int ltq_gpio_request(unsigned int pin, unsigned int mux,
        if (offset >= PINS_PER_PORT || port >= MAX_PORTS)
                return -EINVAL;
 
-       if (gpio_request(pin, name)) {
+       if (devm_gpio_request(dev, pin, name)) {
                pr_err("failed to setup lantiq gpio: %s\n", name);
                return -EBUSY;
        }
-- 
1.7.7.1


<Prev in Thread] Current Thread [Next in Thread>