mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 02:36:02 +00:00
net: pcs: xpcs: drop interface argument from xpcs_create*()
The XPCS sub-driver no longer uses the "interface" argument to the xpcs_create_mdiodev() and xpcs_create_fwnode() functions. Remove this now unnecessary argument, updating the stmmac driver appropriately. Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1svfMp-005ZIp-UX@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
41bf58314b
commit
bf5a61645b
@ -500,23 +500,22 @@ int stmmac_pcs_setup(struct net_device *ndev)
|
||||
struct fwnode_handle *devnode, *pcsnode;
|
||||
struct dw_xpcs *xpcs = NULL;
|
||||
struct stmmac_priv *priv;
|
||||
int addr, mode, ret;
|
||||
int addr, ret;
|
||||
|
||||
priv = netdev_priv(ndev);
|
||||
mode = priv->plat->phy_interface;
|
||||
devnode = priv->plat->port_node;
|
||||
|
||||
if (priv->plat->pcs_init) {
|
||||
ret = priv->plat->pcs_init(priv);
|
||||
} else if (fwnode_property_present(devnode, "pcs-handle")) {
|
||||
pcsnode = fwnode_find_reference(devnode, "pcs-handle", 0);
|
||||
xpcs = xpcs_create_fwnode(pcsnode, mode);
|
||||
xpcs = xpcs_create_fwnode(pcsnode);
|
||||
fwnode_handle_put(pcsnode);
|
||||
ret = PTR_ERR_OR_ZERO(xpcs);
|
||||
} else if (priv->plat->mdio_bus_data &&
|
||||
priv->plat->mdio_bus_data->pcs_mask) {
|
||||
addr = ffs(priv->plat->mdio_bus_data->pcs_mask) - 1;
|
||||
xpcs = xpcs_create_mdiodev(priv->mii, addr, mode);
|
||||
xpcs = xpcs_create_mdiodev(priv->mii, addr);
|
||||
ret = PTR_ERR_OR_ZERO(xpcs);
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -1520,14 +1520,12 @@ static struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev)
|
||||
* xpcs_create_mdiodev() - create a DW xPCS instance with the MDIO @addr
|
||||
* @bus: pointer to the MDIO-bus descriptor for the device to be looked at
|
||||
* @addr: device MDIO-bus ID
|
||||
* @interface: requested PHY interface
|
||||
*
|
||||
* Return: a pointer to the DW XPCS handle if successful, otherwise -ENODEV if
|
||||
* the PCS device couldn't be found on the bus and other negative errno related
|
||||
* to the data allocation and MDIO-bus communications.
|
||||
*/
|
||||
struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr,
|
||||
phy_interface_t interface)
|
||||
struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr)
|
||||
{
|
||||
struct mdio_device *mdiodev;
|
||||
struct dw_xpcs *xpcs;
|
||||
@ -1554,7 +1552,7 @@ struct phylink_pcs *xpcs_create_pcs_mdiodev(struct mii_bus *bus, int addr)
|
||||
{
|
||||
struct dw_xpcs *xpcs;
|
||||
|
||||
xpcs = xpcs_create_mdiodev(bus, addr, PHY_INTERFACE_MODE_NA);
|
||||
xpcs = xpcs_create_mdiodev(bus, addr);
|
||||
if (IS_ERR(xpcs))
|
||||
return ERR_CAST(xpcs);
|
||||
|
||||
@ -1565,7 +1563,6 @@ EXPORT_SYMBOL_GPL(xpcs_create_pcs_mdiodev);
|
||||
/**
|
||||
* xpcs_create_fwnode() - Create a DW xPCS instance from @fwnode
|
||||
* @fwnode: fwnode handle poining to the DW XPCS device
|
||||
* @interface: requested PHY interface
|
||||
*
|
||||
* Return: a pointer to the DW XPCS handle if successful, otherwise -ENODEV if
|
||||
* the fwnode device is unavailable or the PCS device couldn't be found on the
|
||||
@ -1573,8 +1570,7 @@ EXPORT_SYMBOL_GPL(xpcs_create_pcs_mdiodev);
|
||||
* other negative errno related to the data allocations and MDIO-bus
|
||||
* communications.
|
||||
*/
|
||||
struct dw_xpcs *xpcs_create_fwnode(struct fwnode_handle *fwnode,
|
||||
phy_interface_t interface)
|
||||
struct dw_xpcs *xpcs_create_fwnode(struct fwnode_handle *fwnode)
|
||||
{
|
||||
struct mdio_device *mdiodev;
|
||||
struct dw_xpcs *xpcs;
|
||||
|
@ -72,10 +72,8 @@ int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
|
||||
void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces);
|
||||
int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns,
|
||||
int enable);
|
||||
struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr,
|
||||
phy_interface_t interface);
|
||||
struct dw_xpcs *xpcs_create_fwnode(struct fwnode_handle *fwnode,
|
||||
phy_interface_t interface);
|
||||
struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr);
|
||||
struct dw_xpcs *xpcs_create_fwnode(struct fwnode_handle *fwnode);
|
||||
void xpcs_destroy(struct dw_xpcs *xpcs);
|
||||
|
||||
struct phylink_pcs *xpcs_create_pcs_mdiodev(struct mii_bus *bus, int addr);
|
||||
|
Loading…
Reference in New Issue
Block a user