Skip to content

Commit 18da3ec

Browse files
bijudasUlf Hansson
authored andcommitted
mmc: renesas_sdhi: Use of_get_available_child_by_name()
Use the helper of_get_available_child_by_name() to simplify renesas_sdhi_probe(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250407092144.35268-1-biju.das.jz@bp.renesas.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent a06f633 commit 18da3ec

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/mmc/host/renesas_sdhi_core.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,12 +1166,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
11661166
if (ret)
11671167
goto efree;
11681168

1169-
rcfg.of_node = of_get_child_by_name(dev->of_node, "vqmmc-regulator");
1170-
if (!of_device_is_available(rcfg.of_node)) {
1171-
of_node_put(rcfg.of_node);
1172-
rcfg.of_node = NULL;
1173-
}
1174-
1169+
rcfg.of_node = of_get_available_child_by_name(dev->of_node, "vqmmc-regulator");
11751170
if (rcfg.of_node) {
11761171
rcfg.driver_data = priv->host;
11771172
rdev = devm_regulator_register(dev, &renesas_sdhi_vqmmc_regulator, &rcfg);

0 commit comments

Comments
 (0)