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

Configure Feed

Select the types of activity you want to include in your feed.

regulator: da9211: switch to using devm_fwnode_gpiod_get

devm_gpiod_get_from_of_node() is being retired in favor of
devm_fwnode_gpiod_get_index(), that behaves similar to
devm_gpiod_get_index(), but can work with arbitrary firmware node. It
will also be able to support secondary software nodes.

Let's switch this driver over.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/20191004231017.130290-6-dmitry.torokhov@gmail.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dmitry Torokhov and committed by
Mark Brown
61d2fc3c de2792b5

+6 -6
+6 -6
drivers/regulator/da9211-regulator.c
··· 283 283 284 284 pdata->init_data[n] = da9211_matches[i].init_data; 285 285 pdata->reg_node[n] = da9211_matches[i].of_node; 286 - pdata->gpiod_ren[n] = devm_gpiod_get_from_of_node(dev, 287 - da9211_matches[i].of_node, 288 - "enable-gpios", 289 - 0, 290 - GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE, 291 - "da9211-enable"); 286 + pdata->gpiod_ren[n] = devm_fwnode_gpiod_get(dev, 287 + of_fwnode_handle(pdata->reg_node[n]), 288 + "enable", 289 + GPIOD_OUT_HIGH | 290 + GPIOD_FLAGS_BIT_NONEXCLUSIVE, 291 + "da9211-enable"); 292 292 if (IS_ERR(pdata->gpiod_ren[n])) 293 293 pdata->gpiod_ren[n] = NULL; 294 294 n++;