From 37d90f7c51bc9e80eeca7ad1eaf86723351d2814 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sun, 13 May 2012 23:42:55 +0100 Subject: [PATCH] --- yaml --- r: 305888 b: refs/heads/master c: abcf834b80eefb2ded56254ce7de94d2ab258d22 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/watchdog/wm831x_wdt.c | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 1b11e0b91493..7e64efb862b3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 690e7a706da6cb1af0363529603048ef3fce9e82 +refs/heads/master: abcf834b80eefb2ded56254ce7de94d2ab258d22 diff --git a/trunk/drivers/watchdog/wm831x_wdt.c b/trunk/drivers/watchdog/wm831x_wdt.c index b1815c5ed7a7..87d66d236c3e 100644 --- a/trunk/drivers/watchdog/wm831x_wdt.c +++ b/trunk/drivers/watchdog/wm831x_wdt.c @@ -247,8 +247,9 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev) reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT; if (pdata->update_gpio) { - ret = gpio_request(pdata->update_gpio, - "Watchdog update"); + ret = gpio_request_one(pdata->update_gpio, + GPIOF_DIR_OUT | GPIOF_INIT_LOW, + "Watchdog update"); if (ret < 0) { dev_err(wm831x->dev, "Failed to request update GPIO: %d\n", @@ -256,14 +257,6 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev) goto err; } - ret = gpio_direction_output(pdata->update_gpio, 0); - if (ret != 0) { - dev_err(wm831x->dev, - "gpio_direction_output returned: %d\n", - ret); - goto err_gpio; - } - driver_data->update_gpio = pdata->update_gpio; /* Make sure the watchdog takes hardware updates */