arcnet: com20020-pci: set dev_port to the subdevice index
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Fri, 20 Mar 2015 14:22:24 +0000 (15:22 +0100)
committerMichael Grzeschik <m.grzeschik@pengutronix.de>
Mon, 26 Oct 2015 08:10:56 +0000 (09:10 +0100)
This patch sets the dev_port according to the index of
the card. This can be used by udev to name the ports
in userspace.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
drivers/net/arcnet/com20020-pci.c

index a12bf83be7502dd6e4262907a45dc05efb090b80..e3b7c14e619fdf6cf40823d1c4f802e1e4acb7cb 100644 (file)
@@ -96,6 +96,7 @@ static int com20020pci_probe(struct pci_dev *pdev,
                        ret = -ENOMEM;
                        goto out_port;
                }
+               dev->dev_port = i;
 
                dev->netdev_ops = &com20020_netdev_ops;