summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2011-10-17 19:47:44 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-07 13:47:35 -0800
commitf6a5ce266ac9a86619e3fea054b4b6f49734815d (patch)
tree39ceacb65c0a71f8e3cb76cec61888ac9406debc
parent948ed3ced0bab3d89267b7d02b6a4a2b25ce0133 (diff)
watchdog: mtx1-wdt: fix build failure
Commit 72b6e8a847 (watchdog: mtx1-wdt: request gpio before using it) was backported from upstream. The patch is using a gpiolib call which is only available in kernel 2.6.34+. Fix build by using the "old" gpiolib API instead. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/watchdog/mtx-1_wdt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c
index e797a2c797d7..c9dbe11ca620 100644
--- a/drivers/watchdog/mtx-1_wdt.c
+++ b/drivers/watchdog/mtx-1_wdt.c
@@ -211,13 +211,14 @@ static int __devinit mtx1_wdt_probe(struct platform_device *pdev)
int ret;
mtx1_wdt_device.gpio = pdev->resource[0].start;
- ret = gpio_request_one(mtx1_wdt_device.gpio,
- GPIOF_OUT_INIT_HIGH, "mtx1-wdt");
+ ret = gpio_request(mtx1_wdt_device.gpio, "mtx1-wdt");
if (ret < 0) {
dev_err(&pdev->dev, "failed to request gpio");
return ret;
}
+ gpio_direction_output(mtx1_wdt_device.gpio, 1);
+
spin_lock_init(&mtx1_wdt_device.lock);
init_completion(&mtx1_wdt_device.stop);
mtx1_wdt_device.queue = 0;