Move setting of driver data into stmmac_dvr_probe so the
other probe functions don't have to. This will help to
simplify the other probe functions later.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
priv->ioaddr = addr;
priv->dev->base_addr = (unsigned long)addr;
+ dev_set_drvdata(device, priv);
+
/* Verify driver arguments */
stmmac_verify_args();
priv->dev->irq = pdev->irq;
priv->wol_irq = pdev->irq;
- pci_set_drvdata(pdev, priv->dev);
-
dev_dbg(&pdev->dev, "STMMAC PCI driver registration completed\n");
return 0;
if (mac)
memcpy(priv->dev->dev_addr, mac, ETH_ALEN);
- platform_set_drvdata(pdev, priv->dev);
-
pr_debug("STMMAC platform driver registration completed");
return 0;