net: phy: fixed_phy: remove irq argument from fixed_phy_register
All callers pass PHY_POLL, therefore remove irq argument from fixed_phy_register(). Note: I keep the irq argument in fixed_phy_add_gpiod() for now, for the case that somebody may want to use a GPIO interrupt in the future, by e.g. adding a call to fwnode_irq_get() to fixed_phy_get_gpiod(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://patch.msgid.link/31cdb232-a5e9-4997-a285-cb9a7d208124@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
3f1716ee0f
commit
d23b4af5df
@@ -405,7 +405,7 @@ static int __init dsa_loop_init(void)
|
||||
unsigned int i, ret;
|
||||
|
||||
for (i = 0; i < NUM_FIXED_PHYS; i++)
|
||||
phydevs[i] = fixed_phy_register(PHY_POLL, &status, NULL);
|
||||
phydevs[i] = fixed_phy_register(&status, NULL);
|
||||
|
||||
ret = mdio_driver_register(&dsa_loop_drv);
|
||||
if (ret)
|
||||
|
||||
@@ -1446,7 +1446,7 @@ int bgmac_phy_connect_direct(struct bgmac *bgmac)
|
||||
struct phy_device *phy_dev;
|
||||
int err;
|
||||
|
||||
phy_dev = fixed_phy_register(PHY_POLL, &fphy_status, NULL);
|
||||
phy_dev = fixed_phy_register(&fphy_status, NULL);
|
||||
if (IS_ERR(phy_dev)) {
|
||||
dev_err(bgmac->dev, "Failed to register fixed PHY device\n");
|
||||
return PTR_ERR(phy_dev);
|
||||
|
||||
@@ -625,7 +625,7 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
|
||||
.asym_pause = 0,
|
||||
};
|
||||
|
||||
phydev = fixed_phy_register(PHY_POLL, &fphy_status, NULL);
|
||||
phydev = fixed_phy_register(&fphy_status, NULL);
|
||||
if (IS_ERR(phydev)) {
|
||||
dev_err(kdev, "failed to register fixed PHY device\n");
|
||||
return PTR_ERR(phydev);
|
||||
|
||||
@@ -1906,7 +1906,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
|
||||
goto err_phy_connect;
|
||||
}
|
||||
|
||||
phydev = fixed_phy_register(PHY_POLL, &ncsi_phy_status, np);
|
||||
phydev = fixed_phy_register(&ncsi_phy_status, np);
|
||||
if (IS_ERR(phydev)) {
|
||||
dev_err(&pdev->dev, "failed to register fixed PHY device\n");
|
||||
err = PTR_ERR(phydev);
|
||||
|
||||
@@ -458,7 +458,7 @@ int of_phy_register_fixed_link(struct device_node *np)
|
||||
return -ENODEV;
|
||||
|
||||
register_phy:
|
||||
return PTR_ERR_OR_ZERO(fixed_phy_register(PHY_POLL, &status, np));
|
||||
return PTR_ERR_OR_ZERO(fixed_phy_register(&status, np));
|
||||
}
|
||||
EXPORT_SYMBOL(of_phy_register_fixed_link);
|
||||
|
||||
|
||||
@@ -222,8 +222,7 @@ static struct gpio_desc *fixed_phy_get_gpiod(struct device_node *np)
|
||||
}
|
||||
#endif
|
||||
|
||||
struct phy_device *fixed_phy_register(unsigned int irq,
|
||||
struct fixed_phy_status *status,
|
||||
struct phy_device *fixed_phy_register(struct fixed_phy_status *status,
|
||||
struct device_node *np)
|
||||
{
|
||||
struct fixed_mdio_bus *fmb = &platform_fmb;
|
||||
@@ -245,7 +244,7 @@ struct phy_device *fixed_phy_register(unsigned int irq,
|
||||
if (phy_addr < 0)
|
||||
return ERR_PTR(phy_addr);
|
||||
|
||||
ret = fixed_phy_add_gpiod(irq, phy_addr, status, gpiod);
|
||||
ret = fixed_phy_add_gpiod(PHY_POLL, phy_addr, status, gpiod);
|
||||
if (ret < 0) {
|
||||
ida_free(&phy_fixed_ida, phy_addr);
|
||||
return ERR_PTR(ret);
|
||||
|
||||
@@ -2640,7 +2640,7 @@ static struct phy_device *lan78xx_register_fixed_phy(struct lan78xx_net *dev)
|
||||
netdev_info(dev->net,
|
||||
"No PHY found on LAN7801 – registering fixed PHY (e.g. EVB-KSZ9897-1)\n");
|
||||
|
||||
return fixed_phy_register(PHY_POLL, &fphy_status, NULL);
|
||||
return fixed_phy_register(&fphy_status, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,9 +18,8 @@ struct net_device;
|
||||
#if IS_ENABLED(CONFIG_FIXED_PHY)
|
||||
extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier);
|
||||
int fixed_phy_add(int phy_id, struct fixed_phy_status *status);
|
||||
extern struct phy_device *fixed_phy_register(unsigned int irq,
|
||||
struct fixed_phy_status *status,
|
||||
struct device_node *np);
|
||||
struct phy_device *fixed_phy_register(struct fixed_phy_status *status,
|
||||
struct device_node *np);
|
||||
|
||||
extern void fixed_phy_unregister(struct phy_device *phydev);
|
||||
extern int fixed_phy_set_link_update(struct phy_device *phydev,
|
||||
@@ -32,9 +31,9 @@ static inline int fixed_phy_add(int phy_id,
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline struct phy_device *fixed_phy_register(unsigned int irq,
|
||||
struct fixed_phy_status *status,
|
||||
struct device_node *np)
|
||||
static inline struct phy_device *
|
||||
fixed_phy_register(struct fixed_phy_status *status,
|
||||
struct device_node *np)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user