net: fec: get regulator optional
Subsystems (3)
PATCH 1/1 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
--- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fec_main.c +1 -1
@@ -3479,7 +3479,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) {
Signature · 1 line
2.20.1
Quoted 9 lines · Stefan Agner
According to the device tree binding the phy-supply property is optional. Use the
regulator_get_optionalAPI 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 regulatorSigned-off-by Stefan Agner <[email protected]>
Quoted 18 lines
--- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/freescale/fec_main.c +1
-1@@ -3479,7 +3479,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) {
From: Stefan Agner <[email protected]> Sent: Monday, January 21, 2019 10:59 PM
Quoted 9 lines
According to the device tree binding the phy-supply property is optional. Use the
regulator_get_optionalAPI 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 regulatorSigned-off-by Stefan Agner <[email protected]>
Thanks.
Quoted 20 lines
--- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/freescale/fec_main.c +1
-2@@ -3479,7 +3479,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) { --2.20.1
From: Stefan Agner <[email protected]>
Date: Mon, 21 Jan 2019 15:58:47 +0100
Quoted 8 lines
According to the device tree binding the phy-supply property is optional. Use the
regulator_get_optionalAPI 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 regulatorSigned-off-by Stefan Agner <[email protected]>
Applied.