]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: adin: Convert to U_BOOT_PHY_DRIVER()
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 19 Mar 2023 17:02:43 +0000 (18:02 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 7 Apr 2023 12:18:48 +0000 (14:18 +0200)
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>
Acked-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com> #microblaze (MANUAL_RELOC)
drivers/net/phy/adin.c
drivers/net/phy/phy.c
include/phy.h

index a5bfd960d9c96af250df052be48ae8c800c33fe8..fb9f1e4c70d3ef6c1c459113d1fdb63221b6423b 100644 (file)
@@ -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;
-}
index 50bfabbb765c72ede6302f4c12b4714a63d6078e..ecb4b72ed10393d199a97407746f220ca3eb3ff2 100644 (file)
@@ -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
index 1eccfacec684700af4fc478de2f619b5067f499f..dbc0da7e084da7115fa8455ed95e10bd7dc3d922 100644 (file)
@@ -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);