]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: slg51000: switch to using fwnode_gpiod_get_index
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 4 Oct 2019 23:10:12 +0000 (16:10 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 7 Oct 2019 13:01:56 +0000 (14:01 +0100)
commitc6d45747e784a4921fa893acca266b77a0fa5f2b
treefda2602c1f625d40ab3751f06124a80048dba738
parent26394fcce9ec24a4c48f6db713e1cb057d5ad0a3
regulator: slg51000: switch to using fwnode_gpiod_get_index

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.

Note that now that we have a good non-devm API for getting GPIO from
arbitrary firmware node, there is no reason to use devm API here as
regulator core takes care of managing lifetime of "enable" GPIO and we
were immediately detaching requested GPIO from devm anyway.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20191004231017.130290-3-dmitry.torokhov@gmail.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/slg51000-regulator.c