netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] net: emac: use platform_{get,set}_drvdata()
@ 2013-09-02  8:06 Jingoo Han
  2013-09-02  8:08 ` [PATCH 2/5] net: sunhme: " Jingoo Han
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jingoo Han @ 2013-09-02  8:06 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, 'Petri Gynther', 'Jingoo Han'

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/net/ethernet/ibm/emac/core.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 2d3b064..6b5c722 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -2312,7 +2312,7 @@ static int emac_check_deps(struct emac_instance *dev,
 		if (deps[i].ofdev == NULL)
 			continue;
 		if (deps[i].drvdata == NULL)
-			deps[i].drvdata = dev_get_drvdata(&deps[i].ofdev->dev);
+			deps[i].drvdata = platform_get_drvdata(deps[i].ofdev);
 		if (deps[i].drvdata != NULL)
 			there++;
 	}
@@ -2799,9 +2799,9 @@ static int emac_probe(struct platform_device *ofdev)
 		/*  display more info about what's missing ? */
 		goto err_reg_unmap;
 	}
-	dev->mal = dev_get_drvdata(&dev->mal_dev->dev);
+	dev->mal = platform_get_drvdata(dev->mal_dev);
 	if (dev->mdio_dev != NULL)
-		dev->mdio_instance = dev_get_drvdata(&dev->mdio_dev->dev);
+		dev->mdio_instance = platform_get_drvdata(dev->mdio_dev);
 
 	/* Register with MAL */
 	dev->commac.ops = &emac_commac_ops;
@@ -2892,7 +2892,7 @@ static int emac_probe(struct platform_device *ofdev)
 	 * fully initialized
 	 */
 	wmb();
-	dev_set_drvdata(&ofdev->dev, dev);
+	platform_set_drvdata(ofdev, dev);
 
 	/* There's a new kid in town ! Let's tell everybody */
 	wake_up_all(&emac_probe_wait);
@@ -2951,7 +2951,7 @@ static int emac_probe(struct platform_device *ofdev)
 
 static int emac_remove(struct platform_device *ofdev)
 {
-	struct emac_instance *dev = dev_get_drvdata(&ofdev->dev);
+	struct emac_instance *dev = platform_get_drvdata(ofdev);
 
 	DBG(dev, "remove" NL);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] net: sunhme: use platform_{get,set}_drvdata()
  2013-09-02  8:06 [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() Jingoo Han
@ 2013-09-02  8:08 ` Jingoo Han
  2013-09-02  8:10 ` [PATCH 3/5] net: mdio-octeon: " Jingoo Han
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jingoo Han @ 2013-09-02  8:08 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, 'Jon Mason', 'Francois Romieu',
	'Jingoo Han'

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

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

diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index c67e683..227c499 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2798,7 +2798,7 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
 		goto err_out_free_coherent;
 	}
 
-	dev_set_drvdata(&op->dev, hp);
+	platform_set_drvdata(op, hp);
 
 	if (qfe_slot != -1)
 		printk(KERN_INFO "%s: Quattro HME slot %d (SBUS) 10/100baseT Ethernet ",
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] net: mdio-octeon: use platform_{get,set}_drvdata()
  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 ` Jingoo Han
  2013-09-02  8:11 ` [PATCH 4/5] net: tulip: use pci_{get,set}_drvdata() Jingoo Han
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jingoo Han @ 2013-09-02  8:10 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, 'David Daney', 'Jingoo Han'

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/net/phy/mdio-octeon.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index 7f18f80..6aee02e 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -244,7 +244,7 @@ static int octeon_mdiobus_remove(struct platform_device *pdev)
 	struct octeon_mdiobus *bus;
 	union cvmx_smix_en smi_en;
 
-	bus = dev_get_drvdata(&pdev->dev);
+	bus = platform_get_drvdata(pdev);
 
 	mdiobus_unregister(bus->mii_bus);
 	mdiobus_free(bus->mii_bus);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] net: tulip: use pci_{get,set}_drvdata()
  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 ` Jingoo Han
  2013-09-02  8:12 ` [PATCH 5/5] net: sunhme: " Jingoo Han
  2013-09-04  2:40 ` [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() David Miller
  4 siblings, 0 replies; 7+ messages in thread
From: Jingoo Han @ 2013-09-02  8:11 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, 'Danny Kukawka', 'Jeff Kirsher',
	'Jingoo Han'

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/dec/tulip/de4x5.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index 4c83003..2db6c57 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -2319,7 +2319,7 @@ static void de4x5_pci_remove(struct pci_dev *pdev)
 	struct net_device *dev;
 	u_long iobase;
 
-	dev = dev_get_drvdata(&pdev->dev);
+	dev = pci_get_drvdata(pdev);
 	iobase = dev->base_addr;
 
 	unregister_netdev (dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] net: sunhme: use pci_{get,set}_drvdata()
  2013-09-02  8:06 [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() Jingoo Han
                   ` (2 preceding siblings ...)
  2013-09-02  8:11 ` [PATCH 4/5] net: tulip: use pci_{get,set}_drvdata() Jingoo Han
@ 2013-09-02  8:12 ` Jingoo Han
  2013-09-04  2:40 ` [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() David Miller
  4 siblings, 0 replies; 7+ messages in thread
From: Jingoo Han @ 2013-09-02  8:12 UTC (permalink / raw)
  To: 'David S. Miller'
  Cc: netdev, 'Jon Mason', 'Francois Romieu',
	'Jingoo Han'

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/5] net: emac: use platform_{get,set}_drvdata()
  2013-09-02  8:06 [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() Jingoo Han
                   ` (3 preceding siblings ...)
  2013-09-02  8:12 ` [PATCH 5/5] net: sunhme: " Jingoo Han
@ 2013-09-04  2:40 ` David Miller
  2013-09-04  3:00   ` Jingoo Han
  4 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2013-09-04  2:40 UTC (permalink / raw)
  To: jg1.han; +Cc: netdev, pgynther

From: Jingoo Han <jg1.han@samsung.com>
Date: Mon, 02 Sep 2013 17:06:52 +0900

> Use the wrapper functions for getting and setting the driver data
> using platform_device instead of using dev_{get,set}_drvdata()
> with &pdev->dev, so we can directly pass a struct platform_device.
> This is a purely cosmetic change.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

All 5 patches applied.

Please, in the future, provide an initial "[PATCH 00/nn] " posting for
a series of patches, giving a top-level description of what is happening.

This way I can include that commit message text in a merge commit and
also I have an appropriate email to reply to if I just want to say
that I applied everything in the series.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/5] net: emac: use platform_{get,set}_drvdata()
  2013-09-04  2:40 ` [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() David Miller
@ 2013-09-04  3:00   ` Jingoo Han
  0 siblings, 0 replies; 7+ messages in thread
From: Jingoo Han @ 2013-09-04  3:00 UTC (permalink / raw)
  To: 'David Miller'; +Cc: netdev, pgynther, 'Jingoo Han'

On Wednesday, September 04, 2013 11:40 AM, David Miller wrote:
> 
> From: Jingoo Han <jg1.han@samsung.com>
> Date: Mon, 02 Sep 2013 17:06:52 +0900
> 
> > Use the wrapper functions for getting and setting the driver data
> > using platform_device instead of using dev_{get,set}_drvdata()
> > with &pdev->dev, so we can directly pass a struct platform_device.
> > This is a purely cosmetic change.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> 
> All 5 patches applied.
> 
> Please, in the future, provide an initial "[PATCH 00/nn] " posting for
> a series of patches, giving a top-level description of what is happening.

OK, I will provide an initial "[PATCH 00/nn]" posting.
Thank you for your suggestion. :-)

Best regards,
Jingoo Han

> 
> This way I can include that commit message text in a merge commit and
> also I have an appropriate email to reply to if I just want to say
> that I applied everything in the series.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-04  3:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 5/5] net: sunhme: " Jingoo Han
2013-09-04  2:40 ` [PATCH 1/5] net: emac: use platform_{get,set}_drvdata() David Miller
2013-09-04  3:00   ` Jingoo Han

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).