]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ks8851: Rename ndev to netdev in probe
authorMarek Vasut <marex@denx.de>
Thu, 28 May 2020 22:21:29 +0000 (00:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 May 2020 23:30:03 +0000 (16:30 -0700)
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>
drivers/net/ethernet/micrel/ks8851.c

index e32ef9403803f1b420e0951c898cee2965b0c8ba..2b85072993c521a43ea395b8a351a1d17d1475e9 100644 (file)
@@ -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;
 }