Skip to content

Commit

Permalink
stmmac: move driver data setting into stmmac_dvr_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joachim Eastwood authored and David S. Miller committed May 21, 2015
1 parent 614919c commit 803f8fc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2828,6 +2828,8 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device,
priv->ioaddr = addr;
priv->dev->base_addr = (unsigned long)addr;

dev_set_drvdata(device, priv);

/* Verify driver arguments */
stmmac_verify_args();

Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
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;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,6 @@ int stmmac_pltfr_probe(struct platform_device *pdev)
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;
Expand Down

0 comments on commit 803f8fc

Please sign in to comment.