mdio_bus: don't use managed reset-controller
authorDavid Bauer <mail@david-bauer.net>
Fri, 22 Nov 2019 21:44:51 +0000 (22:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Nov 2019 18:43:40 +0000 (10:43 -0800)
commit32085f25d7b68404055f3525c780142fc72e543f
treea87d4b58580b71cf638eb0cc586c3db7a03f691b
parent312434617cb16be5166316cf9d08ba760b1042a1
mdio_bus: don't use managed reset-controller

Geert Uytterhoeven reported that using devm_reset_controller_get leads
to a WARNING when probing a reset-controlled PHY. This is because the
device devm_reset_controller_get gets supplied is not actually the
one being probed.

Acquire an unmanaged reset-control as well as free the reset_control on
unregister to fix this.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David Bauer <mail@david-bauer.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c