]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mdio-bcm-unimac: Fix clock handling
authorAndre Przywara <andre.przywara@arm.com>
Tue, 24 Mar 2020 16:10:10 +0000 (16:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 23:45:32 +0000 (16:45 -0700)
commitad0e70a271cb9a64d9e184c1bdb611aea80e029c
tree367a69d1ad6357f5247f92da1693751959ac08e7
parent4b8d8d5ed8598b35bc4a5e237db5aea39894b30d
net: phy: mdio-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.

Fixes: a7f6c5cb7c340 ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-bcm-unimac.c