From: Wang Chen Date: Mon, 8 Dec 2008 09:13:25 +0000 (-0800) Subject: staging-winbond: Kill directly reference of netdev->priv X-Git-Tag: v2.6.29-rc1~581^2~285 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5a001a070e032bea1be563b13ebf9819cd5e54d4;p=linux-2.6-omap-h63xx.git 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. Signed-off-by: Wang Chen Signed-off-by: David S. Miller --- diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c index f4a7875f238..39ca9b9878f 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);