Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abcf834b authored by Mark Brown's avatar Mark Brown Committed by Wim Van Sebroeck
Browse files

watchdog: wm831x: Convert to gpio_request_one()



Use the more modern API.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 690e7a70
Loading
Loading
Loading
Loading
+3 −10
Original line number Original line Diff line number Diff line
@@ -247,7 +247,8 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev)
		reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT;
		reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT;


		if (pdata->update_gpio) {
		if (pdata->update_gpio) {
			ret = gpio_request(pdata->update_gpio,
			ret = gpio_request_one(pdata->update_gpio,
					       GPIOF_DIR_OUT | GPIOF_INIT_LOW,
					       "Watchdog update");
					       "Watchdog update");
			if (ret < 0) {
			if (ret < 0) {
				dev_err(wm831x->dev,
				dev_err(wm831x->dev,
@@ -256,14 +257,6 @@ static int __devinit wm831x_wdt_probe(struct platform_device *pdev)
				goto err;
				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;
			driver_data->update_gpio = pdata->update_gpio;


			/* Make sure the watchdog takes hardware updates */
			/* Make sure the watchdog takes hardware updates */