From: Joachim Eastwood Date: Wed, 20 May 2015 18:03:06 +0000 (+0200) Subject: stmmac: move driver data setting into stmmac_dvr_probe X-Git-Tag: v4.2-rc1~130^2~240^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=803f8fc46274bbd15757961be44a58ea6f3032d4;p=platform%2Fkernel%2Flinux-exynos.git 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: Joachim Eastwood Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 42e1492..396eb59 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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(); diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index 3bca908..4743d00 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -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; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 3e194c3..8d7e160 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -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;