diff options
-rw-r--r-- | drivers/watchdog/wm831x_wdt.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c index b1815c5ed7a7..87d66d236c3e 100644 --- a/drivers/watchdog/wm831x_wdt.c +++ b/drivers/watchdog/wm831x_wdt.c | |||
@@ -247,8 +247,9 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev) | |||
247 | reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT; | 247 | reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT; |
248 | 248 | ||
249 | if (pdata->update_gpio) { | 249 | if (pdata->update_gpio) { |
250 | ret = gpio_request(pdata->update_gpio, | 250 | ret = gpio_request_one(pdata->update_gpio, |
251 | "Watchdog update"); | 251 | GPIOF_DIR_OUT | GPIOF_INIT_LOW, |
252 | "Watchdog update"); | ||
252 | if (ret < 0) { | 253 | if (ret < 0) { |
253 | dev_err(wm831x->dev, | 254 | dev_err(wm831x->dev, |
254 | "Failed to request update GPIO: %d\n", | 255 | "Failed to request update GPIO: %d\n", |
@@ -256,14 +257,6 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev) | |||
256 | goto err; | 257 | goto err; |
257 | } | 258 | } |
258 | 259 | ||
259 | ret = gpio_direction_output(pdata->update_gpio, 0); | ||
260 | if (ret != 0) { | ||
261 | dev_err(wm831x->dev, | ||
262 | "gpio_direction_output returned: %d\n", | ||
263 | ret); | ||
264 | goto err_gpio; | ||
265 | } | ||
266 | |||
267 | driver_data->update_gpio = pdata->update_gpio; | 260 | driver_data->update_gpio = pdata->update_gpio; |
268 | 261 | ||
269 | /* Make sure the watchdog takes hardware updates */ | 262 | /* Make sure the watchdog takes hardware updates */ |