]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:01:35 +0000 (11:01 +0200)
commit2482eb4c901105241d90f2ab45c441b1f3b62b0c
tree8ef50bae87ec935ae4616c6ee46a1dec139b3e66
parent9d749cede626141a8d510647ac16e649c162ee06
net: phy: mdio-bcm-unimac: Fix clock handling

[ Upstream commit ad0e70a271cb9a64d9e184c1bdb611aea80e029c ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/mdio-bcm-unimac.c