]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: move definition of genphy_c45_driver to phy_device.c
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 10 Jun 2025 21:34:53 +0000 (23:34 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 13 Jun 2025 01:23:08 +0000 (18:23 -0700)
genphy_c45_read_status() is exported, so we can move definition of
genphy_c45_driver to phy_device.c and make it static. This helps
to clean up phy.h a little.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/ead3ab17-22d0-4cd3-901c-3d493ab851e6@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy-c45.c
drivers/net/phy/phy_device.c
include/linux/phy.h

index bdd70d424491b4b3a013ff514c073ca7b58758cd..61670be0f09574ea90828d79c13bb0ce740fd018 100644 (file)
@@ -1573,10 +1573,3 @@ int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
        return ret;
 }
 EXPORT_SYMBOL(genphy_c45_ethtool_set_eee);
-
-struct phy_driver genphy_c45_driver = {
-       .phy_id         = 0xffffffff,
-       .phy_id_mask    = 0xffffffff,
-       .name           = "Generic Clause 45 PHY",
-       .read_status    = genphy_c45_read_status,
-};
index 73f9cb2e28442ef01e4b79da7ca1e1ead1f32751..2902193e12f2f00c8e9150f87b27100cef104957 100644 (file)
@@ -59,6 +59,13 @@ struct phy_fixup {
        int (*run)(struct phy_device *phydev);
 };
 
+static struct phy_driver genphy_c45_driver = {
+       .phy_id         = 0xffffffff,
+       .phy_id_mask    = 0xffffffff,
+       .name           = "Generic Clause 45 PHY",
+       .read_status    = genphy_c45_read_status,
+};
+
 __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_basic_features) __ro_after_init;
 EXPORT_SYMBOL_GPL(phy_basic_features);
 
index e194dad1623d3fcb8e37591a26334ba75410876d..c021b351ab0dca0e22671afe45d7a56bb6489f8e 100644 (file)
@@ -1941,9 +1941,6 @@ int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
                               struct ethtool_keee *data);
 int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
 
-/* Generic C45 PHY driver */
-extern struct phy_driver genphy_c45_driver;
-
 /* The gen10g_* functions are the old Clause 45 stub */
 int gen10g_config_aneg(struct phy_device *phydev);