summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/micrel
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2020-05-29 00:21:29 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-28 16:30:03 -0700
commitbfd1e0eb08f6ac25659e3d9bfd80b8ddffe57c94 (patch)
treea6a72a8733d96e5eb99257feab4cd3b5768e1054 /drivers/net/ethernet/micrel
parentd320692d9f8502e819e511ea5294552e0a8d3d9b (diff)
net: ks8851: Rename ndev to netdev in probe
Rename ndev variable to netdev for the sake of consistency. No functional change. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Marek Vasut <marex@denx.de> Cc: David S. Miller <davem@davemloft.net> Cc: Lukas Wunner <lukas@wunner.de> Cc: Petr Stetiar <ynezz@true.cz> Cc: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r--drivers/net/ethernet/micrel/ks8851.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index e32ef9403803..2b85072993c5 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1414,21 +1414,21 @@ static SIMPLE_DEV_PM_OPS(ks8851_pm_ops, ks8851_suspend, ks8851_resume);
static int ks8851_probe(struct spi_device *spi)
{
struct device *dev = &spi->dev;
- struct net_device *ndev;
+ struct net_device *netdev;
struct ks8851_net *ks;
int ret;
unsigned cider;
int gpio;
- ndev = alloc_etherdev(sizeof(struct ks8851_net));
- if (!ndev)
+ netdev = alloc_etherdev(sizeof(struct ks8851_net));
+ if (!netdev)
return -ENOMEM;
spi->bits_per_word = 8;
- ks = netdev_priv(ndev);
+ ks = netdev_priv(netdev);
- ks->netdev = ndev;
+ ks->netdev = netdev;
ks->spidev = spi;
ks->tx_space = 6144;
@@ -1500,7 +1500,7 @@ static int ks8851_probe(struct spi_device *spi)
ks->eeprom.register_write = ks8851_eeprom_regwrite;
/* setup mii state */
- ks->mii.dev = ndev;
+ ks->mii.dev = netdev;
ks->mii.phy_id = 1,
ks->mii.phy_id_mask = 1;
ks->mii.reg_num_mask = 0xf;
@@ -1516,15 +1516,15 @@ static int ks8851_probe(struct spi_device *spi)
skb_queue_head_init(&ks->txq);
- ndev->ethtool_ops = &ks8851_ethtool_ops;
- SET_NETDEV_DEV(ndev, dev);
+ netdev->ethtool_ops = &ks8851_ethtool_ops;
+ SET_NETDEV_DEV(netdev, dev);
spi_set_drvdata(spi, ks);
netif_carrier_off(ks->netdev);
- ndev->if_port = IF_PORT_100BASET;
- ndev->netdev_ops = &ks8851_netdev_ops;
- ndev->irq = spi->irq;
+ netdev->if_port = IF_PORT_100BASET;
+ netdev->netdev_ops = &ks8851_netdev_ops;
+ netdev->irq = spi->irq;
/* issue a global soft reset to reset the device. */
ks8851_soft_reset(ks, GRR_GSR);
@@ -1543,14 +1543,14 @@ static int ks8851_probe(struct spi_device *spi)
ks8851_read_selftest(ks);
ks8851_init_mac(ks);
- ret = register_netdev(ndev);
+ ret = register_netdev(netdev);
if (ret) {
dev_err(dev, "failed to register network device\n");
goto err_netdev;
}
- netdev_info(ndev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n",
- CIDER_REV_GET(cider), ndev->dev_addr, ndev->irq,
+ netdev_info(netdev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n",
+ CIDER_REV_GET(cider), netdev->dev_addr, netdev->irq,
ks->rc_ccr & CCR_EEPROM ? "has" : "no");
return 0;
@@ -1564,7 +1564,7 @@ err_reg:
regulator_disable(ks->vdd_io);
err_reg_io:
err_gpio:
- free_netdev(ndev);
+ free_netdev(netdev);
return ret;
}