X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fwatchdog%2Fwm831x_wdt.c;h=87d66d236c3e668c33936f0abbc156dc43d7489d;hb=a21f976094819d2862f8fdbd39ab5b22e7d27a1a;hp=b1815c5ed7a72ac7c24e90e8dc62649f8a32bd0b;hpb=99ce58ddc4eadec8c35d9a1d64ff57703fdcfacc;p=~andy%2Flinux diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c index b1815c5ed7a..87d66d236c3 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) 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 */