diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-13 23:42:55 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-05-23 16:26:07 +0200 |
commit | abcf834b80eefb2ded56254ce7de94d2ab258d22 (patch) | |
tree | bbf55c2b1a272281069ff45b87869214f012277b | |
parent | 690e7a706da6cb1af0363529603048ef3fce9e82 (diff) | |
download | blackbird-op-linux-abcf834b80eefb2ded56254ce7de94d2ab258d22.tar.gz blackbird-op-linux-abcf834b80eefb2ded56254ce7de94d2ab258d22.zip |
watchdog: wm831x: Convert to gpio_request_one()
Use the more modern API.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-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) 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 */ |