bcm63xx_enet: use platform device id directly for miibus name
authorJonas Gorski <jonas.gorski@gmail.com>
Sun, 17 Dec 2017 16:02:55 +0000 (17:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Dec 2017 16:07:16 +0000 (11:07 -0500)
Directly use the platform device for generating the miibus name. This
removes the last user of bcm_enet_priv::mac_id and we can remove the
field.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcm63xx_enet.c
drivers/net/ethernet/broadcom/bcm63xx_enet.h

index d4519c621d08d253ae005866701fa02005c22d10..1fbbbabe758855650c9875f853cb820d753c2066 100644 (file)
@@ -1750,7 +1750,6 @@ static int bcm_enet_probe(struct platform_device *pdev)
        dev->irq = priv->irq = res_irq->start;
        priv->irq_rx = res_irq_rx->start;
        priv->irq_tx = res_irq_tx->start;
-       priv->mac_id = pdev->id;
 
        priv->mac_clk = devm_clk_get(&pdev->dev, "enet");
        if (IS_ERR(priv->mac_clk)) {
@@ -1818,7 +1817,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
                bus->priv = priv;
                bus->read = bcm_enet_mdio_read_phylib;
                bus->write = bcm_enet_mdio_write_phylib;
-               sprintf(bus->id, "%s-%d", pdev->name, priv->mac_id);
+               sprintf(bus->id, "%s-%d", pdev->name, pdev->id);
 
                /* only probe bus where we think the PHY is, because
                 * the mdio read operation return 0 instead of 0xffff
index 5a66728d47761d2c28f1371802db34ae44a67936..1d3c917eb8300e4d8a6a858764ae3077674966cd 100644 (file)
@@ -193,9 +193,6 @@ struct bcm_enet_mib_counters {
 
 struct bcm_enet_priv {
 
-       /* mac id (from platform device id) */
-       int mac_id;
-
        /* base remapped address of device */
        void __iomem *base;