netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next] staging-winbond: Kill directly reference of netdev->priv
@ 2008-12-08  5:33 Wang Chen
  2008-12-08  9:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Chen @ 2008-12-08  5:33 UTC (permalink / raw)
  To: David S. Miller; +Cc: gregkh, NETDEV

This driver is not yet finished.
At this time, we don't know how netdev be created and how
private data be allocated.
So, simply use netdev_priv() now and leave some temp comment.

Compile test only.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
 drivers/staging/winbond/linux/wbusb.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
index f4a7875..39ca9b9 100644
--- a/drivers/staging/winbond/linux/wbusb.c
+++ b/drivers/staging/winbond/linux/wbusb.c
@@ -336,7 +336,11 @@ WbUsb_destroy(phw_data_t pHwData)
 
 int wb35_open(struct net_device *netdev)
 {
-	PADAPTER Adapter = (PADAPTER)netdev->priv;
+	/* netdev_priv() or netdev->ml_priv should reference to the address of
+	 * private data(PADAPTER). It depends on whether private data memory is
+	 * allocated when alloc_netdev().
+	 */
+	PADAPTER Adapter = (PADAPTER)netdev_priv(netdev);
 	phw_data_t pHwData = &Adapter->sHwData;
 
         netif_start_queue(netdev);
-- 
1.5.3.4





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

* Re: [PATCH next] staging-winbond: Kill directly reference of netdev->priv
  2008-12-08  5:33 [PATCH next] staging-winbond: Kill directly reference of netdev->priv Wang Chen
@ 2008-12-08  9:13 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-12-08  9:13 UTC (permalink / raw)
  To: wangchen; +Cc: gregkh, netdev

From: Wang Chen <wangchen@cn.fujitsu.com>
Date: Mon, 08 Dec 2008 13:33:22 +0800

> This driver is not yet finished.
> At this time, we don't know how netdev be created and how
> private data be allocated.
> So, simply use netdev_priv() now and leave some temp comment.
> 
> Compile test only.
> 
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>

Applied, thanks.

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

end of thread, other threads:[~2008-12-08  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-08  5:33 [PATCH next] staging-winbond: Kill directly reference of netdev->priv Wang Chen
2008-12-08  9:13 ` David Miller

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