]> git.baikalelectronics.ru Git - kernel.git/commit
net: mdio: provide shim implementation of devm_of_mdiobus_register
authorVladimir Oltean <olteanv@gmail.com>
Tue, 18 May 2021 17:49:24 +0000 (20:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 May 2021 20:47:36 +0000 (13:47 -0700)
commit8074fef814659820b981494d3742602e6278f841
tree92e7c07fa2d2489e2163086a65403d5f7feb468c
parent883702f7c8bc30627717734dd331774d1e905de6
net: mdio: provide shim implementation of devm_of_mdiobus_register

Similar to the way in which of_mdiobus_register() has a fallback to the
non-DT based mdiobus_register() when CONFIG_OF is not set, we can create
a shim for the device-managed devm_of_mdiobus_register() which calls
devm_mdiobus_register() and discards the struct device_node *.

In particular, this solves a build issue with the qca8k DSA driver which
uses devm_of_mdiobus_register and can be compiled without CONFIG_OF.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/of_mdio.h