Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call.
Converted using sed
"s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {"
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
return gen10g_discover_mmds(phydev);
}
-struct phy_driver gen10g_driver = {
+U_BOOT_PHY_DRIVER(gen10g) = {
.uid = 0xffffffff,
.mask = 0xffffffff,
.name = "Generic 10G PHY",
{
#ifdef CONFIG_PHYLIB_10G
if (phydev->is_c45)
- return &gen10g_driver;
+ return ll_entry_get(struct phy_driver, gen10g, phy_driver);
#endif
return ll_entry_get(struct phy_driver, genphy, phy_driver);
int asym_pause;
};
-#ifdef CONFIG_PHYLIB_10G
-extern struct phy_driver gen10g_driver;
-#endif
-
/**
* phy_init() - Initializes the PHY drivers
* This function registers all available PHY drivers