diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-12-08 04:14:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-08 04:14:16 -0500 |
commit | b74ca3a896b9ab5f952bc440154758e708c48884 (patch) | |
tree | cc67fc67ddd6ac20e25b1060ab633a4d5c4e6ee8 /net | |
parent | 5a001a070e032bea1be563b13ebf9819cd5e54d4 (diff) |
netdevice: Kill netdev->priv
This is the last shoot of this series.
After I removing all directly reference of netdev->priv, I am killing
"priv" of "struct net_device" and fixing relative comments/docs.
Anyone will not be allowed to reference netdev->priv directly.
If you want to reference the memory of private data, use netdev_priv()
instead.
If the private data is not allocted when alloc_netdev(), use
netdev->ml_priv to point that memory after you creating that private
data.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/mpc.c | 4 | ||||
-rw-r--r-- | net/core/dev.c | 6 |
2 files changed, 2 insertions, 8 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 12e9ea371db1..039d5cc72c3d 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -341,8 +341,8 @@ static const char *mpoa_device_type_string(char type) | |||
341 | } | 341 | } |
342 | 342 | ||
343 | /* | 343 | /* |
344 | * lec device calls this via its dev->priv->lane2_ops->associate_indicator() | 344 | * lec device calls this via its netdev_priv(dev)->lane2_ops |
345 | * when it sees a TLV in LE_ARP packet. | 345 | * ->associate_indicator() when it sees a TLV in LE_ARP packet. |
346 | * We fill in the pointer above when we see a LANE2 lec initializing | 346 | * We fill in the pointer above when we see a LANE2 lec initializing |
347 | * See LANE2 spec 3.1.5 | 347 | * See LANE2 spec 3.1.5 |
348 | * | 348 | * |
diff --git a/net/core/dev.c b/net/core/dev.c index 4615e9a443aa..f54cac76438a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4378,12 +4378,6 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | |||
4378 | dev->num_tx_queues = queue_count; | 4378 | dev->num_tx_queues = queue_count; |
4379 | dev->real_num_tx_queues = queue_count; | 4379 | dev->real_num_tx_queues = queue_count; |
4380 | 4380 | ||
4381 | if (sizeof_priv) { | ||
4382 | dev->priv = ((char *)dev + | ||
4383 | ((sizeof(struct net_device) + NETDEV_ALIGN_CONST) | ||
4384 | & ~NETDEV_ALIGN_CONST)); | ||
4385 | } | ||
4386 | |||
4387 | dev->gso_max_size = GSO_MAX_SIZE; | 4381 | dev->gso_max_size = GSO_MAX_SIZE; |
4388 | 4382 | ||
4389 | netdev_init_queues(dev); | 4383 | netdev_init_queues(dev); |