net: phy: davicom: Convert to U_BOOT_PHY_DRIVER()
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 19 Mar 2023 17:02:50 +0000 (18:02 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 7 Apr 2023 12:18:49 +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/davicom.c
drivers/net/phy/phy.c
include/phy.h

index 4666497..31ffa1a 100644 (file)
@@ -69,7 +69,7 @@ static int dm9161_startup(struct phy_device *phydev)
        return dm9161_parse_status(phydev);
 }
 
-static struct phy_driver DM9161_driver = {
+U_BOOT_PHY_DRIVER(dm9161) = {
        .name = "Davicom DM9161E",
        .uid = 0x181b880,
        .mask = 0xffffff0,
@@ -78,10 +78,3 @@ static struct phy_driver DM9161_driver = {
        .startup = &dm9161_startup,
        .shutdown = &genphy_shutdown,
 };
-
-int phy_davicom_init(void)
-{
-       phy_register(&DM9161_driver);
-
-       return 0;
-}
index d595290..6d7e07c 100644 (file)
@@ -517,9 +517,6 @@ int phy_init(void)
 #ifdef CONFIG_MV88E61XX_SWITCH
        phy_mv88e61xx_init();
 #endif
-#ifdef CONFIG_PHY_DAVICOM
-       phy_davicom_init();
-#endif
 #ifdef CONFIG_PHY_ET1011C
        phy_et1011c_init();
 #endif
index 797139b..51c2ddb 100644 (file)
@@ -316,7 +316,6 @@ int gen10g_shutdown(struct phy_device *phydev);
 int gen10g_discover_mmds(struct phy_device *phydev);
 
 int phy_mv88e61xx_init(void);
-int phy_davicom_init(void);
 int phy_et1011c_init(void);
 int phy_lxt_init(void);
 int phy_marvell_init(void);