generic: ar8216: register the switch from the probe routine
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 14 Feb 2013 14:01:24 +0000 (14:01 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 14 Feb 2013 14:01:24 +0000 (14:01 +0000)
commit66e79cf7ba2d221ff0aa52e1e4de6cb3d8c973f6
tree49e57eaef9c45fceb039edbc74aa7d0d8a77b876
parente698e5246b10f9a80da51ed54a5cbe8abff6317c
generic: ar8216: register the switch from the probe routine

Currently the switch gets registered when an ethernet
driver connects to a PHY of the switch. This method does
not work with the ethernet drivers which are connecting
to the PHY from their ndo_open callback. With those
ethernet drivers, the driver tries to register the switch
each time when the etherned device is opened and this causes
a deadlock.

Move the switch registration into the probe routine to fix
this problem.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35602 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/generic/files/drivers/net/phy/ar8216.c