diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-11-13 02:37:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-13 02:37:49 -0500 |
commit | 454d7c9b14e20fd1949e2686e9de4a2926e01476 (patch) | |
tree | fae8bd1bfb5fd496977a0639ad71c54a2ee278ae /drivers/net/arcnet/com20020-isa.c | |
parent | 7a12122c7a00347da9669cfcde82954c9e3d6f5e (diff) |
netdevice: safe convert to netdev_priv() #part-1
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/arcnet/com20020-isa.c')
-rw-r--r-- | drivers/net/arcnet/com20020-isa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/arcnet/com20020-isa.c b/drivers/net/arcnet/com20020-isa.c index 9289e6103de5..ea53a940272f 100644 --- a/drivers/net/arcnet/com20020-isa.c +++ b/drivers/net/arcnet/com20020-isa.c | |||
@@ -52,7 +52,7 @@ static int __init com20020isa_probe(struct net_device *dev) | |||
52 | { | 52 | { |
53 | int ioaddr; | 53 | int ioaddr; |
54 | unsigned long airqmask; | 54 | unsigned long airqmask; |
55 | struct arcnet_local *lp = dev->priv; | 55 | struct arcnet_local *lp = netdev_priv(dev); |
56 | int err; | 56 | int err; |
57 | 57 | ||
58 | BUGLVL(D_NORMAL) printk(VERSION); | 58 | BUGLVL(D_NORMAL) printk(VERSION); |
@@ -151,7 +151,7 @@ static int __init com20020_init(void) | |||
151 | if (node && node != 0xff) | 151 | if (node && node != 0xff) |
152 | dev->dev_addr[0] = node; | 152 | dev->dev_addr[0] = node; |
153 | 153 | ||
154 | lp = dev->priv; | 154 | lp = netdev_priv(dev); |
155 | lp->backplane = backplane; | 155 | lp->backplane = backplane; |
156 | lp->clockp = clockp & 7; | 156 | lp->clockp = clockp & 7; |
157 | lp->clockm = clockm & 3; | 157 | lp->clockm = clockm & 3; |