net: PHY: bcm-unimac: Fix clock handling
Subsystems (3)
PATCH 1/1 net: PHY: bcm-unimac: Fix clock handling
The DT binding for this PHY describes an *optional* clock property. Due to a bug in the error handling logic, we are actually ignoring this clock *all* of the time so far.
Fix this by using devm_clk_get_optional() to handle this clock properly.
--- drivers/net/phy/mdio-bcm-unimac.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/phy/mdio-bcm-unimac.c +2 -4
@@ -242,11 +242,9 @@ static int unimac_mdio_probe(struct platform_device *pdev)return -ENOMEM ; } - priv->clk =devm_clk_get (&pdev->dev,NULL ); -if (PTR_ERR (priv->clk) == -EPROBE_DEFER ) + priv->clk =devm_clk_get_optional (&pdev->dev,NULL ); +if (IS_ERR (priv->clk))return PTR_ERR (priv->clk); -else - priv->clk =NULL ; ret =clk_prepare_enable (priv->clk);if (ret)
Signature · 1 line
2.17.1
Quoted 7 lines · Andre Przywara
The DT binding for this PHY describes an *optional* clock property. Due to a bug in the error handling logic, we are actually ignoring this clock *all* of the time so far.
Fix this by using
devm_clk_get_optional()to handle this clock properly.Signed-off-by Andre Przywara <[email protected]>
Hi Andre
Do you have a fixes: tag for this?
Andrew
On 24/03/2020 16:17, Andrew Lunn wrote:
Hi,
Quoted 5 lines · Andre Przywara
Quoted 4 lines
The DT binding for this PHY describes an *optional* clock property. Due to a bug in the error handling logic, we are actually ignoring this clock *all* of the time so far.
Quoted 7 lines
Quoted 3 lines
Fix this by using
devm_clk_get_optional()to handle this clock properly.Signed-off-by Andre Przywara <[email protected]>Hi Andre
Do you have a fixes: tag for this?
Should be:
clock divider")
Quoted 1 line
Reviewed-by Andrew Lunn <[email protected]>
Thanks for that!
Cheers,
Andre
Florian Fainelli
Acked-byQuoted 17 lines · André Przywara
On 24/03/2020 16:17, Andrew Lunn wrote:
Hi,
Quoted 5 lines · Andre Przywara
Quoted 4 lines
The DT binding for this PHY describes an *optional* clock property. Due to a bug in the error handling logic, we are actually ignoring this clock *all* of the time so far.
Quoted 7 lines
Quoted 3 lines
Fix this by using
devm_clk_get_optional()to handle this clock properly.Signed-off-by Andre Przywara <[email protected]>Hi Andre
Do you have a fixes: tag for this?
Quoted 7 lines
Should be:
Fixes b78ac6ecd1b6b ("net: phy: mdio-bcm-unimac: Allow configuring MDIOclock divider")
Quoted 1 line
Reviewed-by Andrew Lunn <[email protected]>Thanks for that!
And the subject should be:
net: phy: mdio-bcm-unimac: Fix clock handling
Signature · 1 line
Florian
David Miller
maintainerFrom: Andre Przywara <[email protected]>
Date: Tue, 24 Mar 2020 16:10:10 +0000
Quoted 7 lines
The DT binding for this PHY describes an *optional* clock property. Due to a bug in the error handling logic, we are actually ignoring this clock *all* of the time so far.
Fix this by using
devm_clk_get_optional()to handle this clock properly.Signed-off-by Andre Przywara <[email protected]>
Applied with Fixes tag added and Subject line corrected.
Thanks.