From: manabian@gmail.com (Joachim Eastwood)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next 1/4] stmmac: move driver data setting into stmmac_dvr_probe
Date: Wed, 20 May 2015 20:03:06 +0200 [thread overview]
Message-ID: <1432144989-28283-2-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1432144989-28283-1-git-send-email-manabian@gmail.com>
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>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 2 --
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 --
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 05c146f718a3..fae9195c8ff7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2830,6 +2830,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 3bca908716e2..4743d0017d79 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 ffe9e820b312..6db27dee0901 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -349,8 +349,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;
--
1.8.0
next prev parent reply other threads:[~2015-05-20 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 18:03 [PATCH net-next 0/4] stmmac: probe code refactoring and clean up part 1 Joachim Eastwood
2015-05-20 18:03 ` Joachim Eastwood [this message]
2015-05-20 18:03 ` [PATCH net-next 2/4] stmmac: let stmmac_dvr_probe take a struct of resources Joachim Eastwood
2015-05-20 18:03 ` [PATCH net-next 3/4] stmmac: change the stmmac_dvr_probe return type to int Joachim Eastwood
2015-05-20 18:03 ` [PATCH net-next 4/4] stmmac: drop unnecessary dt checks in stmmac_probe_config_dt Joachim Eastwood
2015-05-21 22:57 ` [PATCH net-next 0/4] stmmac: probe code refactoring and clean up part 1 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432144989-28283-2-git-send-email-manabian@gmail.com \
--to=manabian@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).