Skip to content

Commit 97c9278

Browse files
dtorbroonie
authored andcommitted
regulator: bd71815: switch to using devm_fwnode_gpiod_get()
I would like to stop exporting OF-specific devm_gpiod_get_from_of_node() so that gpiolib can be cleaned a bit, so let's switch to the generic fwnode property API. Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Matti Vaittinen <[email protected]> Link: https://lore.kernel.org/r/20220903-gpiod_get_from_of_node-remove-v1-8-b29adfb27a6c@gmail.com Signed-off-by: Mark Brown <[email protected]>
1 parent 520fb17 commit 97c9278

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/regulator/bd71815-regulator.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,10 @@ static int bd7181x_probe(struct platform_device *pdev)
571571
dev_err(&pdev->dev, "No parent regmap\n");
572572
return -ENODEV;
573573
}
574-
ldo4_en = devm_gpiod_get_from_of_node(&pdev->dev,
575-
pdev->dev.parent->of_node,
576-
"rohm,vsel-gpios", 0,
577-
GPIOD_ASIS, "ldo4-en");
578574

575+
ldo4_en = devm_fwnode_gpiod_get(&pdev->dev,
576+
dev_fwnode(pdev->dev.parent),
577+
"rohm,vsel", GPIOD_ASIS, "ldo4-en");
579578
if (IS_ERR(ldo4_en)) {
580579
ret = PTR_ERR(ldo4_en);
581580
if (ret != -ENOENT)

0 commit comments

Comments
 (0)