diff options
author | Stefan Agner <[email protected]> | 2019-01-21 15:58:47 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-01-22 20:51:21 -0800 |
commit | 25974d8af1bc5116f0d79fc6722425930fd8c0e9 (patch) | |
tree | afbac505a411676630498c5ec81ffa7700fe6749 | |
parent | 7c62b8dd5ca89dabd9f455d19e663bad60951bd5 (diff) |
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: Stefan Agner <[email protected]>
Reviewed-by: Marcel Ziswiler <[email protected]>
Acked-by: Fugang Duan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index ae0f88bce9aa..2370dc204202 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3467,7 +3467,7 @@ fec_probe(struct platform_device *pdev) if (ret) 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)) { ret = regulator_enable(fep->reg_phy); if (ret) { |