
On Mon, Oct 31, 2016 at 4:48 PM, Chris Packham judge.packham@gmail.com wrote:
Commit 5a49f17481bb ("net: mii: Use spatch to update miiphy_register") updated the mvgbe implementation of smi_reg_read/smi_reg_write. Prior to that change mvgbe_phy_read and mvgbe_phy_write where used as wrappers to satisfy the phylib APIs. Because these functions weren't updated in that commit build errors where triggered when CONFIG_PHYLIB was enabled.
Fix these build errors by removing mvgbe_phy_read and mvgbe_phy_write and using smi_reg_read/smi_reg_write directly.
Signed-off-by: Chris Packham judge.packham@gmail.com
Looking at this closer it actually appears that the mvgbe driver has 2 places where a mii_dev is created. The first in mvgbe_phylib_init() which is triggered when CONFIG_PHYLIB is enabled (this is where I first noticed the build error), the second in mvgbe_initialize() which is triggered when CONFIG_MII or CONFIG_CMD_MII is enabled.
I think this could do with some more cleaning up. But perhaps the build error should be fixed first and then we can tackle the cleanup.
I agree - I'll pull this fix as is.
Acked-by: Joe Hershberger joe.hershberger@ni.com