]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: Don't exit mdio registration when mdio subnode is not found in the DTS
authorRomain Perier <romain.perier@gmail.com>
Thu, 7 Jan 2016 20:13:28 +0000 (21:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Jan 2016 23:02:33 +0000 (18:02 -0500)
commitb0ee4af61b4eaf5485d7e7aea96c85ac763af20f
tree50a91e773e897ef456bcd2ffce42636abce6bc77
parent01b71595696415dc52d3bfa322042cd765fca5fa
stmmac: Don't exit mdio registration when mdio subnode is not found in the DTS

Originally, most of the platforms using this driver did not define an mdio subnode
in the devicetree. Commit e34d65 ("stmmac: create of compatible mdio bus for stmmac driver")
introduced a backward compatibily issue by using of_mdiobus_register explicitly
with an mdio subnode. This patch fixes the issue by calling the function
mdiobus_register, when mdio subnode is not found. The driver is now compatible
with both modes.

Fixes: bacc87dbfa3e ("stmmac: create of compatible mdio bus for stmmac driver")
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Tested-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c