Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mark Brown and committed by
Wim Van Sebroeck
abcf834b 690e7a70

+3 -10
+3 -10
drivers/watchdog/wm831x_wdt.c
··· 247 247 reg |= pdata->software << WM831X_WDOG_RST_SRC_SHIFT; 248 248 249 249 if (pdata->update_gpio) { 250 - ret = gpio_request(pdata->update_gpio, 251 - "Watchdog update"); 250 + ret = gpio_request_one(pdata->update_gpio, 251 + GPIOF_DIR_OUT | GPIOF_INIT_LOW, 252 + "Watchdog update"); 252 253 if (ret < 0) { 253 254 dev_err(wm831x->dev, 254 255 "Failed to request update GPIO: %d\n", 255 256 ret); 256 257 goto err; 257 - } 258 - 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 258 } 266 259 267 260 driver_data->update_gpio = pdata->update_gpio;