From: Florian Fainelli Date: Mon, 17 Oct 2011 17:47:44 +0000 (+0200) Subject: watchdog: mtx1-wdt: fix build failure X-Git-Tag: v2.6.32.47~17 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=35b6863ce555ce59e36a2c2bf7c8a8e9a9da577b;p=karo-tx-linux.git watchdog: mtx1-wdt: fix build failure Commit 6d86a0ee (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 Signed-off-by: Greg Kroah-Hartman --- 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;