提交 ce30fa56 编写于 作者: A Andrew Lunn 提交者: Jakub Kicinski

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: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NMichael Walle <michael@walle.cc>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 b063b192
...@@ -839,6 +839,11 @@ int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum, ...@@ -839,6 +839,11 @@ int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum,
} }
EXPORT_SYMBOL_GPL(__mdiobus_modify_changed); 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 * __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function
* @bus: the mii_bus struct * @bus: the mii_bus struct
......
...@@ -459,11 +459,6 @@ static inline int mdiodev_modify_changed(struct mdio_device *mdiodev, ...@@ -459,11 +459,6 @@ static inline int mdiodev_modify_changed(struct mdio_device *mdiodev,
mask, set); mask, set);
} }
static inline u32 mdiobus_c45_addr(int devad, u16 regnum)
{
return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum;
}
static inline u16 mdiobus_c45_regad(u32 regnum) static inline u16 mdiobus_c45_regad(u32 regnum)
{ {
return FIELD_GET(MII_REGADDR_C45_MASK, regnum); return FIELD_GET(MII_REGADDR_C45_MASK, regnum);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册