Commit 803f8fc4 authored by Joachim Eastwood's avatar Joachim Eastwood Committed by David S. Miller

stmmac: move driver data setting into stmmac_dvr_probe

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: default avatarJoachim Eastwood <manabian@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 614919c3
...@@ -2828,6 +2828,8 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device, ...@@ -2828,6 +2828,8 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
priv->ioaddr = addr; priv->ioaddr = addr;
priv->dev->base_addr = (unsigned long)addr; priv->dev->base_addr = (unsigned long)addr;
dev_set_drvdata(device, priv);
/* Verify driver arguments */ /* Verify driver arguments */
stmmac_verify_args(); stmmac_verify_args();
......
...@@ -222,8 +222,6 @@ static int stmmac_pci_probe(struct pci_dev *pdev, ...@@ -222,8 +222,6 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
priv->dev->irq = pdev->irq; priv->dev->irq = pdev->irq;
priv->wol_irq = pdev->irq; priv->wol_irq = pdev->irq;
pci_set_drvdata(pdev, priv->dev);
dev_dbg(&pdev->dev, "STMMAC PCI driver registration completed\n"); dev_dbg(&pdev->dev, "STMMAC PCI driver registration completed\n");
return 0; return 0;
......
...@@ -350,8 +350,6 @@ int stmmac_pltfr_probe(struct platform_device *pdev) ...@@ -350,8 +350,6 @@ int stmmac_pltfr_probe(struct platform_device *pdev)
if (mac) if (mac)
memcpy(priv->dev->dev_addr, mac, ETH_ALEN); memcpy(priv->dev->dev_addr, mac, ETH_ALEN);
platform_set_drvdata(pdev, priv->dev);
pr_debug("STMMAC platform driver registration completed"); pr_debug("STMMAC platform driver registration completed");
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment