Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b74ca3a8 authored by Wang Chen's avatar Wang Chen Committed by David S. Miller
Browse files

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: default avatarWang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a001a07
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Transmit path guidelines:
	static int drv_hard_start_xmit(struct sk_buff *skb,
		   		       struct net_device *dev)
	{
		struct drv *dp = dev->priv;
		struct drv *dp = netdev_priv(dev);

		lock_tx(dp);
		...
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ There are routines in net_init.c to handle the common cases of
alloc_etherdev, alloc_netdev.  These reserve extra space for driver
private data which gets freed when the network device is freed. If
separately allocated data is attached to the network device
(dev->priv) then it is up to the module exit handler to free that.
(netdev_priv(dev)) then it is up to the module exit handler to free that.

MTU
===
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ static const struct ethtool_ops netdev_ethtool_ops;
static int el_debug = EL_DEBUG;

/*
 *	Board-specific info in dev->priv.
 *	Board-specific info in netdev_priv(dev).
 */

struct net_local
+1 −1
Original line number Diff line number Diff line
@@ -420,7 +420,7 @@ static unsigned short __init eeprom_op(long ioaddr, u32 cmd)
   registers that "should" only need to be set once at boot, so that
   there is non-reboot way to recover if something goes wrong.

   This is an attachable device: if there is no dev->priv entry then it wasn't
   This is an attachable device: if there is no private entry then it wasn't
   probed for at boot-time, and we need to probe for it again.
   */
static int net_open(struct net_device *dev)
+1 −1
Original line number Diff line number Diff line
@@ -1046,7 +1046,7 @@ static void eexp_hw_tx_pio(struct net_device *dev, unsigned short *buf,
/*
 * Sanity check the suspected EtherExpress card
 * Read hardware address, reset card, size memory and initialize buffer
 * memory pointers. These are held in dev->priv, in case someone has more
 * memory pointers. These are held in netdev_priv(), in case someone has more
 * than one card in a machine.
 */

Loading