Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Wang Chen and committed by
David S. Miller
5a001a07 4bcd4267

+5 -1
+5 -1
drivers/staging/winbond/linux/wbusb.c
··· 336 336 337 337 int wb35_open(struct net_device *netdev) 338 338 { 339 - PADAPTER Adapter = (PADAPTER)netdev->priv; 339 + /* netdev_priv() or netdev->ml_priv should reference to the address of 340 + * private data(PADAPTER). It depends on whether private data memory is 341 + * allocated when alloc_netdev(). 342 + */ 343 + PADAPTER Adapter = (PADAPTER)netdev_priv(netdev); 340 344 phw_data_t pHwData = &Adapter->sHwData; 341 345 342 346 netif_start_queue(netdev);