Merge branch 'net-phy-add-device-managed-devm_mdiobus_register'
authorDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2020 19:19:55 +0000 (12:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2020 19:19:55 +0000 (12:19 -0700)
commit58989d7cf6eefc7bc63b63739523e9319a8cfd81
tree72992de26e44751843a1e4884d85c327bd68047e
parent4406d36dfdf1fbd954400e16ffeb915c1907d58a
parent0785dad48003408da27579845db2f83c024636df
Merge branch 'net-phy-add-device-managed-devm_mdiobus_register'

Heiner Kallweit says:

====================
net: phy: add device-managed devm_mdiobus_register

If there's no special ordering requirement for mdiobus_unregister(),
then driver code can be simplified by using a device-managed version
of mdiobus_register(). Prerequisite is that bus allocation has been
done device-managed too. Else mdiobus_free() may be called whilst
bus is still registered, resulting in a BUG_ON(). Therefore let
devm_mdiobus_register() return -EPERM if bus was allocated
non-managed.

First user of the new functionality is r8169 driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>