Commit 25974d8a authored by Stefan Agner's avatar Stefan Agner Committed by David S. Miller

net: fec: get regulator optional

According to the device tree binding the phy-supply property is
optional. Use the regulator_get_optional API accordingly. The
code already handles NULL just fine.

This gets rid of the following warning:
  fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
Reviewed-by: default avatarMarcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7c62b8dd
...@@ -3467,7 +3467,7 @@ fec_probe(struct platform_device *pdev) ...@@ -3467,7 +3467,7 @@ fec_probe(struct platform_device *pdev)
if (ret) if (ret)
goto failed_clk_ipg; goto failed_clk_ipg;
fep->reg_phy = devm_regulator_get(&pdev->dev, "phy"); fep->reg_phy = devm_regulator_get_optional(&pdev->dev, "phy");
if (!IS_ERR(fep->reg_phy)) { if (!IS_ERR(fep->reg_phy)) {
ret = regulator_enable(fep->reg_phy); ret = regulator_enable(fep->reg_phy);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment