summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-01-23 20:02:51 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2019-07-09 12:20:56 +0100
commitcd7c5bfc550d9fe7629e686c785808d72ba16d36 (patch)
tree22e4b9f8538a7283c62d568743a753c367e3115a
parentc2b76bc435de31d2e410a8a30e7579df86d091ca (diff)
net: marvell: mvpp2x: set network device of_node
Allow of_find_net_device_by_node() (required by SFP and other subsystems) to find this network device by initialising the of_node pointer. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/ethernet/marvell/mvpp2x/mv_pp2x_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2x/mv_pp2x_main.c b/drivers/net/ethernet/marvell/mvpp2x/mv_pp2x_main.c
index 8ee135090086..3a29f5cead66 100644
--- a/drivers/net/ethernet/marvell/mvpp2x/mv_pp2x_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2x/mv_pp2x_main.c
@@ -4902,6 +4902,7 @@ static int mv_pp2x_port_probe(struct platform_device *pdev,
port = netdev_priv(dev);
port->dev = dev;
SET_NETDEV_DEV(dev, &pdev->dev);
+ dev->dev.of_node = port_node;
port->priv = priv;
mv_pp2x_port_init_config(port);