linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* use platform_{get,set}_drvdata()
@ 2013-08-12 13:24 Libo Chen
  2013-08-14  3:36 ` [PATCH RESEND 0/8] " Libo Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Libo Chen @ 2013-08-12 13:24 UTC (permalink / raw)
  To: David Miller
  Cc: mugunthanvnm, Bill Pemberton, Greg KH, netdev, bigeasy, jg1.han,
	LKML, michal.simek, prabhakar.csengg, Li Zefan, vbordug, renner,
	linuxppc-dev, timur, b-liu


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.


Libo Chen (8):
  net: fsl_pq_mdio: use platform_{get,set}_drvdata()
  net: ucc_geth: use platform_{get,set}_drvdata()
  net: fec_mpc52xx_phy: use platform_{get,set}_drvdata()
  net: fs_enet: use platform_{get,set}_drvdata()
  net: sunbmac: use platform_{get,set}_drvdata()
  net: sunhme: use platform_{get,set}_drvdata()
  net: xilinx_emaclite: use platform_{get,set}_drvdata()
  net: davinci_mdio: use platform_{get,set}_drvdata()

 drivers/net/ethernet/freescale/fec_mpc52xx_phy.c   |    4 +---
 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c  |    1 -
 drivers/net/ethernet/freescale/fsl_pq_mdio.c       |    3 +--
 drivers/net/ethernet/freescale/ucc_geth.c          |    4 +---
 drivers/net/ethernet/sun/sunbmac.c                 |    3 +--
 drivers/net/ethernet/sun/sunhme.c                  |    8 +++-----
 drivers/net/ethernet/ti/davinci_mdio.c             |    4 +---
 drivers/net/ethernet/xilinx/xilinx_emaclite.c      |    4 +---
 8 files changed, 9 insertions(+), 22 deletions(-)

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

* [PATCH RESEND 0/8] use platform_{get,set}_drvdata()
  2013-08-12 13:24 use platform_{get,set}_drvdata() Libo Chen
@ 2013-08-14  3:36 ` Libo Chen
  2013-08-14 18:56   ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Libo Chen @ 2013-08-14  3:36 UTC (permalink / raw)
  To: David Miller
  Cc: Greg KH, netdev, jg1.han, LKML, Li Zefan, vbordug, linuxppc-dev


We can use the wrapper functions platform_{get,set}_drvdata() instead of
dev_{get,set}_drvdata() with &pdev->dev, it is convenient for user.

Also, unnecessary dev_set_drvdata() is removed, because the driver core
clears the driver data to NULL after device_release or on probe failure.

changelog:
	this version add modify record about dev_set_drvdata().

Libo Chen (8):
  net: fsl_pq_mdio: use platform_{get,set}_drvdata()
  net: ucc_geth: use platform_{get,set}_drvdata()
  net: fec_mpc52xx_phy: use platform_{get,set}_drvdata()
  net: fs_enet: remove unnecessary dev_set_drvdata()
  net: sunbmac: use platform_{get,set}_drvdata()
  net: sunhme: use platform_{get,set}_drvdata()
  net: xilinx_emaclite: use platform_{get,set}_drvdata()
  net: davinci_mdio: use platform_{get,set}_drvdata()

 drivers/net/ethernet/freescale/fec_mpc52xx_phy.c   |    4 +---
 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c  |    1 -
 drivers/net/ethernet/freescale/fsl_pq_mdio.c       |    3 +--
 drivers/net/ethernet/freescale/ucc_geth.c          |    4 +---
 drivers/net/ethernet/sun/sunbmac.c                 |    3 +--
 drivers/net/ethernet/sun/sunhme.c                  |    8 +++-----
 drivers/net/ethernet/ti/davinci_mdio.c             |    4 +---
 drivers/net/ethernet/xilinx/xilinx_emaclite.c      |    4 +---
 8 files changed, 9 insertions(+), 22 deletions(-)

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

* Re: [PATCH RESEND 0/8] use platform_{get,set}_drvdata()
  2013-08-14  3:36 ` [PATCH RESEND 0/8] " Libo Chen
@ 2013-08-14 18:56   ` Sergei Shtylyov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2013-08-14 18:56 UTC (permalink / raw)
  To: Libo Chen
  Cc: Greg KH, netdev, jg1.han, LKML, Li Zefan, vbordug, linuxppc-dev,
	David Miller

On 08/14/2013 07:36 AM, Libo Chen wrote:

> We can use the wrapper functions platform_{get,set}_drvdata() instead of
> dev_{get,set}_drvdata() with &pdev->dev, it is convenient for user.
>
> Also, unnecessary dev_set_drvdata() is removed, because the driver core
> clears the driver data to NULL after device_release or on probe failure.

    Saying "also" in the changelog is usually a good sign that the patch 
should be split.

WBR, Sergei

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

end of thread, other threads:[~2013-08-14 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12 13:24 use platform_{get,set}_drvdata() Libo Chen
2013-08-14  3:36 ` [PATCH RESEND 0/8] " Libo Chen
2013-08-14 18:56   ` Sergei Shtylyov

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