Skip to contentSkip to conversation

watchdog: mtx1-wdt: fix build failure

PATCH In review Florian Fainelli 2 participants 2 messages Oct 17, 2011 – Nov 2, 2011 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
This patch is applicable from 2.6.32+ to 2.6.33+ included.

drivers/watchdog/mtx-1_wdt.c +3 -2
index e797a2c..c9dbe11 100644
@@ -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;
Signature · 5 lines
1.7.5.4


-- 
Florian
#1 lore raw
Quoted 9 lines · Florian Fainelli

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.

---
This patch is applicable from 2.6.32+ to 2.6.33+ included.

Thanks, now applied.

greg k-h