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

leds: aat1290: pass flags parameter to devm_gpiod_get

Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

In this case the driver cannot easily be simplified but as the flags
parameter will become mandatory soon this change is necessary
beforehand.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>

authored by

Uwe Kleine-König and committed by
Bryan Wu
8a687719 5e324ebf

+2 -2
+2 -2
drivers/leds/leds-aat1290.c
··· 247 247 #endif 248 248 int ret = 0; 249 249 250 - led->gpio_fl_en = devm_gpiod_get(dev, "flen"); 250 + led->gpio_fl_en = devm_gpiod_get(dev, "flen", GPIOD_ASIS); 251 251 if (IS_ERR(led->gpio_fl_en)) { 252 252 ret = PTR_ERR(led->gpio_fl_en); 253 253 dev_err(dev, "Unable to claim gpio \"flen\".\n"); 254 254 return ret; 255 255 } 256 256 257 - led->gpio_en_set = devm_gpiod_get(dev, "enset"); 257 + led->gpio_en_set = devm_gpiod_get(dev, "enset", GPIOD_ASIS); 258 258 if (IS_ERR(led->gpio_en_set)) { 259 259 ret = PTR_ERR(led->gpio_en_set); 260 260 dev_err(dev, "Unable to claim gpio \"enset\".\n");