Skip to contentSkip to conversation

staging-winbond: Kill directly reference of netdev->priv

PATCH Applied Wang Chen 2 participants 2 messages Dec 8, 2008

Subsystems (3)
lore
Share & tools
lore

Wang Chen

author
#0 lore raw

PATCH 1/1 staging-winbond: Kill directly reference of netdev->priv

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.

---
 drivers/staging/winbond/linux/wbusb.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/staging/winbond/linux/wbusb.c +5 -1
index f4a7875..39ca9b9 100644
@@ -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);
Signature · 1 line
1.5.3.4
maintainer Applied
#1 lore raw

From: Wang Chen <[email protected]>
Date: Mon, 08 Dec 2008 13:33:22 +0800

Quoted 8 lines

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.

Applied, thanks.