mirror of https://github.com/torvalds/linux.git
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>
This commit is contained in:
parent
a06f633e18
commit
18da3ecdba
|
|
@ -1166,12 +1166,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
|||
if (ret)
|
||||
goto efree;
|
||||
|
||||
rcfg.of_node = of_get_child_by_name(dev->of_node, "vqmmc-regulator");
|
||||
if (!of_device_is_available(rcfg.of_node)) {
|
||||
of_node_put(rcfg.of_node);
|
||||
rcfg.of_node = NULL;
|
||||
}
|
||||
|
||||
rcfg.of_node = of_get_available_child_by_name(dev->of_node, "vqmmc-regulator");
|
||||
if (rcfg.of_node) {
|
||||
rcfg.driver_data = priv->host;
|
||||
rdev = devm_regulator_register(dev, &renesas_sdhi_vqmmc_regulator, &rcfg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue