linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mv643xx_eth: fix DT port device name
@ 2013-07-07 20:33 Sebastian Hesselbarth
  2013-07-07 21:43 ` Jonas Gorski
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Hesselbarth @ 2013-07-07 20:33 UTC (permalink / raw)
  To: linux-arm-kernel

Device tree support added to Marvell MV643xx ethernet driver registers
port devices from port device nodes found on the corresponding controller
node. The current port device name will cause the second controller to
fail on registration because of two identical device names. This fixes
the issue by taking the device node's name also as port device name.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Reported-by: Jonas Gorski <jogo@openwrt.org>
---
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Jonas Gorski <jogo@openwrt.org>
Cc: netdev at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
---
 drivers/net/ethernet/marvell/mv643xx_eth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 6495bea..1f3a03d 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2521,7 +2521,7 @@ static int mv643xx_eth_shared_of_add_port(struct platform_device *pdev,
 		of_property_read_u32(pnp, "duplex", &ppd.duplex);
 	}
 
-	ppdev = platform_device_alloc(MV643XX_ETH_NAME, ppd.port_number);
+	ppdev = platform_device_alloc(pnp->name, ppd.port_number);
 	if (!ppdev)
 		return -ENOMEM;
 	ppdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-10 22:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-07 20:33 [PATCH] net: mv643xx_eth: fix DT port device name Sebastian Hesselbarth
2013-07-07 21:43 ` Jonas Gorski
2013-07-07 21:58   ` Sebastian Hesselbarth
2013-07-07 22:44     ` [PATCH] net: mv643xx_eth: do not use port number as platform device id Jonas Gorski
2013-07-07 22:05   ` [PATCH] net: mv643xx_eth: fix DT port device name Jonas Gorski
2013-07-10 10:29     ` Gerlando Falauto
2013-07-10 22:59       ` Sebastian Hesselbarth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).