From 81a8728c834cfb004205b42eebafd86a70098509 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 19 Mar 2023 18:03:10 +0100 Subject: [PATCH] net: phy: ncsi: Convert to U_BOOT_PHY_DRIVER() 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 Reviewed-by: Ramon Fried Acked-by: Michal Simek Tested-by: Michal Simek #microblaze (MANUAL_RELOC) --- drivers/net/phy/ncsi.c | 8 +------- drivers/net/phy/phy.c | 3 --- include/phy.h | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/phy/ncsi.c b/drivers/net/phy/ncsi.c index bb7ecebed3..eb3fd65bb4 100644 --- a/drivers/net/phy/ncsi.c +++ b/drivers/net/phy/ncsi.c @@ -881,7 +881,7 @@ int ncsi_shutdown(struct phy_device *phydev) return 0; } -static struct phy_driver ncsi_driver = { +U_BOOT_PHY_DRIVER(ncsi) = { .uid = PHY_NCSI_ID, .mask = 0xffffffff, .name = "NC-SI", @@ -891,9 +891,3 @@ static struct phy_driver ncsi_driver = { .startup = ncsi_startup, .shutdown = ncsi_shutdown, }; - -int phy_ncsi_init(void) -{ - phy_register(&ncsi_driver); - return 0; -} diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 245357c31d..69db79f79e 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -514,9 +514,6 @@ int phy_init(void) phy_drv_reloc(drv); #endif -#ifdef CONFIG_PHY_NCSI - phy_ncsi_init(); -#endif #ifdef CONFIG_PHY_XILINX_GMII2RGMII phy_xilinx_gmii2rgmii_init(); #endif diff --git a/include/phy.h b/include/phy.h index 9cabfeedec..001c998db4 100644 --- a/include/phy.h +++ b/include/phy.h @@ -315,7 +315,6 @@ int gen10g_startup(struct phy_device *phydev); int gen10g_shutdown(struct phy_device *phydev); int gen10g_discover_mmds(struct phy_device *phydev); -int phy_ncsi_init(void); int phy_xilinx_gmii2rgmii_init(void); /** -- 2.39.5