]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:17:35 +0000 (21:17 -0600)
commitc3e1e9eb8c8c907945eb78f455ad2c7d45a6cfca
treecb8dc5c8e4d485b1e4cbbc31e50244af4b7f095b
parent44d453184f30822a32261fadce9155430e92ecdd
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