summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mdio_bus.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2023-01-09 18:30:45 +0300
committerJakub Kicinski <kuba@kernel.org>2023-01-11 02:53:36 +0300
commitce30fa56cbf09ab6b28170ced689c3cfd329e979 (patch)
treeb30a96abd84606e809148c7304574288d9f56038 /drivers/net/phy/mdio_bus.c
parentb063b1924fd9bf0bc157cf644764dc2151d04ccc (diff)
downloadlinux-ce30fa56cbf09ab6b28170ced689c3cfd329e979.tar.xz
net: mdio: Move mdiobus_c45_addr() next to users
Now that mdiobus_c45_addr() is only used within the MDIO code during fallback, move the function next to its only users. This function should not be used any more in drivers, the c45 helpers should be used in its place, so hiding it away will prevent any new users from being added. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r--drivers/net/phy/mdio_bus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index f71ba6ab85a7..522cbe6a0b23 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -839,6 +839,11 @@ int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum,
}
EXPORT_SYMBOL_GPL(__mdiobus_modify_changed);
+static u32 mdiobus_c45_addr(int devad, u16 regnum)
+{
+ return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum;
+}
+
/**
* __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function
* @bus: the mii_bus struct