diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-11-13 02:38:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-13 02:38:14 -0500 |
commit | 4cf1653aa90c6320dc8032443b5e322820aa28b1 (patch) | |
tree | 7920008d3f953defdcda8c81d39da963290d93ad /drivers/net/e1000e/netdev.c | |
parent | 454d7c9b14e20fd1949e2686e9de4a2926e01476 (diff) |
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/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 3 |
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) | |||
1988 | struct net_device *poll_dev = adapter->netdev; | 1988 | struct net_device *poll_dev = adapter->netdev; |
1989 | int tx_cleaned = 0, work_done = 0; | 1989 | int tx_cleaned = 0, work_done = 0; |
1990 | 1990 | ||
1991 | /* Must NOT use netdev_priv macro here. */ | 1991 | adapter = netdev_priv(poll_dev); |
1992 | adapter = poll_dev->priv; | ||
1993 | 1992 | ||
1994 | if (adapter->msix_entries && | 1993 | if (adapter->msix_entries && |
1995 | !(adapter->rx_ring->ims_val & adapter->tx_ring->ims_val)) | 1994 | !(adapter->rx_ring->ims_val & adapter->tx_ring->ims_val)) |