From 4de8644504a69285fa9e28da072ab1ec298543f5 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 19 Mar 2023 18:02:43 +0100 Subject: [PATCH] net: phy: adin: 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 Acked-by: Michal Simek Tested-by: Michal Simek #microblaze (MANUAL_RELOC) --- drivers/net/phy/adin.c | 9 +-------- drivers/net/phy/phy.c | 3 --- include/phy.h | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/phy/adin.c b/drivers/net/phy/adin.c index a5bfd960d9..fb9f1e4c70 100644 --- a/drivers/net/phy/adin.c +++ b/drivers/net/phy/adin.c @@ -252,7 +252,7 @@ static int adin1300_config(struct phy_device *phydev) return genphy_config(phydev); } -static struct phy_driver ADIN1300_driver = { +U_BOOT_PHY_DRIVER(ADIN1300) = { .name = "ADIN1300", .uid = PHY_ID_ADIN1300, .mask = 0xffffffff, @@ -261,10 +261,3 @@ static struct phy_driver ADIN1300_driver = { .startup = genphy_startup, .shutdown = genphy_shutdown, }; - -int phy_adin_init(void) -{ - phy_register(&ADIN1300_driver); - - return 0; -} diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 50bfabbb76..ecb4b72ed1 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -520,9 +520,6 @@ int phy_init(void) #ifdef CONFIG_MV88E61XX_SWITCH phy_mv88e61xx_init(); #endif -#ifdef CONFIG_PHY_ADIN - phy_adin_init(); -#endif #ifdef CONFIG_PHY_AQUANTIA phy_aquantia_init(); #endif diff --git a/include/phy.h b/include/phy.h index 1eccfacec6..dbc0da7e08 100644 --- a/include/phy.h +++ b/include/phy.h @@ -317,7 +317,6 @@ int gen10g_discover_mmds(struct phy_device *phydev); int phy_b53_init(void); int phy_mv88e61xx_init(void); -int phy_adin_init(void); int phy_aquantia_init(void); int phy_atheros_init(void); int phy_broadcom_init(void); -- 2.39.5