To: | netdev@vger.kernel.org, linux-mips@linux-mips.org |
---|---|
Subject: | [PATCH 4/4] bcm63xx_enet: use platform device id directly for miibus name |
From: | Jonas Gorski <jonas.gorski@gmail.com> |
Date: | Sun, 17 Dec 2017 17:02:55 +0100 |
Cc: | Ralf Baechle <ralf@linux-mips.org>, "David S. Miller" <davem@davemloft.net>, Florian Fainelli <f.fainelli@gmail.com>, bcm-kernel-feedback-list@broadcom.com |
Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gEtf1b6b8xM7vtvcIuT/adaeyiuLdF3ms8NE6QwmSSk=; b=XUwr84PnxYB96g/DJZ5IQc/741tvkmwAt0q3bbLokLnOporxzsIR+q8VyY9Bp3IPiR 7gKoeILxDip18MMcF+4+yQS3+moeV3Je5cGmLwwxeR0StlxOkc1RT1hYwtZpjEuA98YO y51eqXCiQ1CwnyG28DjJQUwboj00GWsiKJp8DeN1dgczhB7UfdMjJeM9WkEROg1NdfTz 4nCMEJuZHmZzKYwS/paVylyRGxue9VNxnp37d8NTxVGm0v32YSfYv95Gr8m7PuQGft2g KeYZkOPR6uz9p4eEu27gL9nVbIoHdiIt+70NH+JOGPF3giBjZsGrEBhPvfOZk8KPmeOK BYSw== |
In-reply-to: | <20171217160255.30342-1-jonas.gorski@gmail.com> |
List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
List-owner: | <mailto:ralf@linux-mips.org> |
List-post: | <mailto:linux-mips@linux-mips.org> |
List-software: | Ecartis version 1.0.0 |
List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
Original-recipient: | rfc822;linux-mips@linux-mips.org |
References: | <20171217160255.30342-1-jonas.gorski@gmail.com> |
Sender: | linux-mips-bounce@linux-mips.org |
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> --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 +-- drivers/net/ethernet/broadcom/bcm63xx_enet.h | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index d4519c621d08..1fbbbabe7588 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -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 diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.h b/drivers/net/ethernet/broadcom/bcm63xx_enet.h index 5a66728d4776..1d3c917eb830 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.h +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.h @@ -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; -- 2.13.2 |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | [PATCH 3/4] bcm63xx_enet: remove pointless mac_id check, Jonas Gorski |
---|---|
Next by Date: | Re: [PATCH v2 00/13] MIPS: add support for the Microsemi MIPS SoCs, PrasannaKumar Muralidharan |
Previous by Thread: | [PATCH 3/4] bcm63xx_enet: remove pointless mac_id check, Jonas Gorski |
Next by Thread: | Re: [PATCH 0/4] bcm63xx_enet: remove mac_id usage, David Miller |
Indexes: | [Date] [Thread] [Top] [All Lists] |