Linux Watchdog driver development
 help / color / mirror / Atom feed
* [PATCH] watchdog: wm831x: Convert to gpio_request_one()
@ 2012-05-13 22:42 Mark Brown
  2012-05-14 13:36 ` Wim Van Sebroeck
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-05-13 22:42 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: patches, linux-watchdog, Mark Brown

Use the more modern API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/watchdog/wm831x_wdt.c |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c
index b1815c5..87d66d2 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 */
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: wm831x: Convert to gpio_request_one()
  2012-05-13 22:42 [PATCH] watchdog: wm831x: Convert to gpio_request_one() Mark Brown
@ 2012-05-14 13:36 ` Wim Van Sebroeck
  0 siblings, 0 replies; 2+ messages in thread
From: Wim Van Sebroeck @ 2012-05-14 13:36 UTC (permalink / raw)
  To: Mark Brown; +Cc: patches, linux-watchdog

Hi Mark,

> Use the more modern API.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Added to linux-watchdog-next.

Thanks,
Wim.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-14 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13 22:42 [PATCH] watchdog: wm831x: Convert to gpio_request_one() Mark Brown
2012-05-14 13:36 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox