]> git.baikalelectronics.ru Git - kernel.git/commit
of: mdio: Fall back to mdiobus_register() with NULL device_node
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 15 May 2018 23:56:18 +0000 (16:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 May 2018 18:20:35 +0000 (14:20 -0400)
commitbb73e9bf59b22bc15b628e762c9497b7ed7920b7
treee02858312ab7961afd67a4d5c2a222de490ec9e1
parent9c54b09529c2fa6fe27246373e18bb06ee3516ca
of: mdio: Fall back to mdiobus_register() with NULL device_node

When the device_node specified is NULL, fall back to mdiobus_register().
We have a number of drivers having a similar pattern which is:

if (np)
of_mdiobus_register()
else
mdiobus_register()

so incorporate that behavior within the core of_mdiobus_register()
function. This is also consistent with the stub version that we defined
when CONFIG_OF=n.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/of/of_mdio.c