net: phy: make of_set_phy_supported work with genphy driver
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 21 May 2014 13:29:45 +0000 (15:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 19:43:02 +0000 (15:43 -0400)
commitde906af1cf8d5f2e9c461148577ac26dcdaea86e
tree4732496e85bf6845316ea9055605abf4b20dbda1
parentc242a47238fa2a6a54af8a16e62b54e6e031d4bc
net: phy: make of_set_phy_supported work with genphy driver

of_set_phy_supported allows overwiting hardware capabilities of
a phy with values from the devicetree. of_set_phy_supported is
called right after phy_device_register in the assumption that
phy_probe is called from phy_device_register and the features
of the phy are already initialized. For the genphy driver this
is not true, here phy_probe is called later during phy_connect
time. phy_probe will then overwrite all settings done from
of_set_phy_supported
Fix this by moving of_set_phy_supported to the core phy code
and calling it from phy_probe.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c
drivers/of/of_mdio.c