summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorWang Chen2008-11-13 08:38:14 +0100
committerDavid S. Miller2008-11-13 08:38:14 +0100
commit4cf1653aa90c6320dc8032443b5e322820aa28b1 (patch)
tree7920008d3f953defdcda8c81d39da963290d93ad /drivers/net/e1000e
parentnetdevice: safe convert to netdev_priv() #part-1 (diff)
downloadkernel-qcow2-linux-4cf1653aa90c6320dc8032443b5e322820aa28b1.tar.gz
kernel-qcow2-linux-4cf1653aa90c6320dc8032443b5e322820aa28b1.tar.xz
kernel-qcow2-linux-4cf1653aa90c6320dc8032443b5e322820aa28b1.zip
netdevice: safe convert to netdev_priv() #part-2
We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/netdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 63e5688011e8..3eeae1cf994e 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1988,8 +1988,7 @@ static int e1000_clean(struct napi_struct *napi, int budget)
struct net_device *poll_dev = adapter->netdev;
int tx_cleaned = 0, work_done = 0;
- /* Must NOT use netdev_priv macro here. */
- adapter = poll_dev->priv;
+ adapter = netdev_priv(poll_dev);
if (adapter->msix_entries &&
!(adapter->rx_ring->ims_val & adapter->tx_ring->ims_val))