netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net-next] rocker: set physical device for port netdevice
@ 2016-10-27 12:31 Jiri Pirko
  2016-10-27 20:03 ` kbuild test robot
  2016-10-27 20:04 ` kbuild test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Jiri Pirko @ 2016-10-27 12:31 UTC (permalink / raw)
  To: netdev; +Cc: davem

From: Jiri Pirko <jiri@mellanox.com>

Do this so the sysfs has "device" link correctly set.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/rocker/rocker_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index 2e81b70..6d96a0c 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -2542,6 +2542,7 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
 	dev = alloc_etherdev(sizeof(struct rocker_port));
 	if (!dev)
 		return -ENOMEM;
+	SET_NETDEV_DEV(dev, &pdev->dev);
 	rocker_port = netdev_priv(dev);
 	rocker_port->dev = dev;
 	rocker_port->rocker = rocker;
-- 
2.5.5

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

end of thread, other threads:[~2016-10-27 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 12:31 [patch net-next] rocker: set physical device for port netdevice Jiri Pirko
2016-10-27 20:03 ` kbuild test robot
2016-10-27 20:26   ` Jiri Pirko
2016-10-27 20:04 ` kbuild test robot

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).