netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'David S. Miller'" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, 'Jon Mason' <jdmason@kudzu.us>,
	'Francois Romieu' <romieu@fr.zoreil.com>,
	'Jingoo Han' <jg1.han@samsung.com>
Subject: [PATCH 5/5] net: sunhme: use pci_{get,set}_drvdata()
Date: Mon, 02 Sep 2013 17:12:41 +0900	[thread overview]
Message-ID: <001301cea7b4$3225c110$96714330$%han@samsung.com> (raw)
In-Reply-To: <000f01cea7b3$6226fd30$2674f790$%han@samsung.com>

Use the wrapper functions for getting and setting the driver data
using pci_dev instead of using dev_{get,set}_drvdata() with
&pdev->dev, so we can directly pass a struct pci_dev. This is
a purely cosmetic change.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/net/ethernet/sun/sunhme.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 227c499..e37b587 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -3111,7 +3111,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
 		goto err_out_iounmap;
 	}
 
-	dev_set_drvdata(&pdev->dev, hp);
+	pci_set_drvdata(pdev, hp);
 
 	if (!qfe_slot) {
 		struct pci_dev *qpdev = qp->quattro_dev;
@@ -3159,7 +3159,7 @@ err_out:
 
 static void happy_meal_pci_remove(struct pci_dev *pdev)
 {
-	struct happy_meal *hp = dev_get_drvdata(&pdev->dev);
+	struct happy_meal *hp = pci_get_drvdata(pdev);
 	struct net_device *net_dev = hp->dev;
 
 	unregister_netdev(net_dev);
@@ -3171,7 +3171,7 @@ static void happy_meal_pci_remove(struct pci_dev *pdev)
 
 	free_netdev(net_dev);
 
-	dev_set_drvdata(&pdev->dev, NULL);
+	pci_set_drvdata(pdev, NULL);
 }
 
 static DEFINE_PCI_DEVICE_TABLE(happymeal_pci_ids) = {
-- 
1.7.10.4

  parent reply	other threads:[~2013-09-02  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02  8:06 [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() Jingoo Han
2013-09-02  8:08 ` [PATCH 2/5] net: sunhme: " Jingoo Han
2013-09-02  8:10 ` [PATCH 3/5] net: mdio-octeon: " Jingoo Han
2013-09-02  8:11 ` [PATCH 4/5] net: tulip: use pci_{get,set}_drvdata() Jingoo Han
2013-09-02  8:12 ` Jingoo Han [this message]
2013-09-04  2:40 ` [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() David Miller
2013-09-04  3:00   ` Jingoo Han

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='001301cea7b4$3225c110$96714330$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=davem@davemloft.net \
    --cc=jdmason@kudzu.us \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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).