Commit 17c324fa authored by Wang Chen's avatar Wang Chen Committed by David S. Miller

um: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().
Signed-off-by: default avatarWang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6cbeba55
...@@ -22,7 +22,7 @@ static void daemon_init(struct net_device *dev, void *data) ...@@ -22,7 +22,7 @@ static void daemon_init(struct net_device *dev, void *data)
struct daemon_data *dpri; struct daemon_data *dpri;
struct daemon_init *init = data; struct daemon_init *init = data;
pri = dev->priv; pri = netdev_priv(dev);
dpri = (struct daemon_data *) pri->user; dpri = (struct daemon_data *) pri->user;
dpri->sock_type = init->sock_type; dpri->sock_type = init->sock_type;
dpri->ctl_sock = init->ctl_sock; dpri->ctl_sock = init->ctl_sock;
......
...@@ -28,7 +28,7 @@ static void mcast_init(struct net_device *dev, void *data) ...@@ -28,7 +28,7 @@ static void mcast_init(struct net_device *dev, void *data)
struct mcast_data *dpri; struct mcast_data *dpri;
struct mcast_init *init = data; struct mcast_init *init = data;
pri = dev->priv; pri = netdev_priv(dev);
dpri = (struct mcast_data *) pri->user; dpri = (struct mcast_data *) pri->user;
dpri->addr = init->addr; dpri->addr = init->addr;
dpri->port = init->port; dpri->port = init->port;
......
...@@ -76,7 +76,7 @@ static int update_drop_skb(int max) ...@@ -76,7 +76,7 @@ static int update_drop_skb(int max)
static int uml_net_rx(struct net_device *dev) static int uml_net_rx(struct net_device *dev)
{ {
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = netdev_priv(dev);
int pkt_len; int pkt_len;
struct sk_buff *skb; struct sk_buff *skb;
...@@ -119,7 +119,7 @@ static void uml_dev_close(struct work_struct *work) ...@@ -119,7 +119,7 @@ static void uml_dev_close(struct work_struct *work)
static irqreturn_t uml_net_interrupt(int irq, void *dev_id) static irqreturn_t uml_net_interrupt(int irq, void *dev_id)
{ {
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = netdev_priv(dev);
int err; int err;
if (!netif_running(dev)) if (!netif_running(dev))
...@@ -150,7 +150,7 @@ static irqreturn_t uml_net_interrupt(int irq, void *dev_id) ...@@ -150,7 +150,7 @@ static irqreturn_t uml_net_interrupt(int irq, void *dev_id)
static int uml_net_open(struct net_device *dev) static int uml_net_open(struct net_device *dev)
{ {
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = netdev_priv(dev);
int err; int err;
if (lp->fd >= 0) { if (lp->fd >= 0) {
...@@ -195,7 +195,7 @@ static int uml_net_open(struct net_device *dev) ...@@ -195,7 +195,7 @@ static int uml_net_open(struct net_device *dev)
static int uml_net_close(struct net_device *dev) static int uml_net_close(struct net_device *dev)
{ {
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = netdev_priv(dev);
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -213,7 +213,7 @@ static int uml_net_close(struct net_device *dev) ...@@ -213,7 +213,7 @@ static int uml_net_close(struct net_device *dev)
static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = netdev_priv(dev);
unsigned long flags; unsigned long flags;
int len; int len;
...@@ -250,7 +250,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -250,7 +250,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
static struct net_device_stats *uml_net_get_stats(struct net_device *dev) static struct net_device_stats *uml_net_get_stats(struct net_device *dev)
{ {
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = netdev_priv(dev);
return &lp->stats; return &lp->stats;
} }
...@@ -267,7 +267,7 @@ static void uml_net_tx_timeout(struct net_device *dev) ...@@ -267,7 +267,7 @@ static void uml_net_tx_timeout(struct net_device *dev)
static int uml_net_set_mac(struct net_device *dev, void *addr) static int uml_net_set_mac(struct net_device *dev, void *addr)
{ {
struct uml_net_private *lp = dev->priv; struct uml_net_private *lp = netdev_priv(dev);
struct sockaddr *hwaddr = addr; struct sockaddr *hwaddr = addr;
spin_lock_irq(&lp->lock); spin_lock_irq(&lp->lock);
...@@ -368,7 +368,7 @@ static void net_device_release(struct device *dev) ...@@ -368,7 +368,7 @@ static void net_device_release(struct device *dev)
{ {
struct uml_net *device = dev->driver_data; struct uml_net *device = dev->driver_data;
struct net_device *netdev = device->dev; struct net_device *netdev = device->dev;
struct uml_net_private *lp = netdev->priv; struct uml_net_private *lp = netdev_priv(netdev);
if (lp->remove != NULL) if (lp->remove != NULL)
(*lp->remove)(&lp->user); (*lp->remove)(&lp->user);
...@@ -420,7 +420,7 @@ static void eth_configure(int n, void *init, char *mac, ...@@ -420,7 +420,7 @@ static void eth_configure(int n, void *init, char *mac,
printk(KERN_INFO "Netdevice %d (%pM) : ", n, device->mac); printk(KERN_INFO "Netdevice %d (%pM) : ", n, device->mac);
lp = dev->priv; lp = netdev_priv(dev);
/* This points to the transport private data. It's still clear, but we /* This points to the transport private data. It's still clear, but we
* must memset it to 0 *now*. Let's help the drivers. */ * must memset it to 0 *now*. Let's help the drivers. */
memset(lp, 0, size); memset(lp, 0, size);
...@@ -730,7 +730,7 @@ static int net_remove(int n, char **error_out) ...@@ -730,7 +730,7 @@ static int net_remove(int n, char **error_out)
return -ENODEV; return -ENODEV;
dev = device->dev; dev = device->dev;
lp = dev->priv; lp = netdev_priv(dev);
if (lp->fd > 0) if (lp->fd > 0)
return -EBUSY; return -EBUSY;
unregister_netdev(dev); unregister_netdev(dev);
...@@ -761,7 +761,7 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event, ...@@ -761,7 +761,7 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event,
if (dev->open != uml_net_open) if (dev->open != uml_net_open)
return NOTIFY_DONE; return NOTIFY_DONE;
lp = dev->priv; lp = netdev_priv(dev);
proc = NULL; proc = NULL;
switch (event) { switch (event) {
......
...@@ -21,7 +21,7 @@ void pcap_init(struct net_device *dev, void *data) ...@@ -21,7 +21,7 @@ void pcap_init(struct net_device *dev, void *data)
struct pcap_data *ppri; struct pcap_data *ppri;
struct pcap_init *init = data; struct pcap_init *init = data;
pri = dev->priv; pri = netdev_priv(dev);
ppri = (struct pcap_data *) pri->user; ppri = (struct pcap_data *) pri->user;
ppri->host_if = init->host_if; ppri->host_if = init->host_if;
ppri->promisc = init->promisc; ppri->promisc = init->promisc;
......
...@@ -19,7 +19,7 @@ static void slip_init(struct net_device *dev, void *data) ...@@ -19,7 +19,7 @@ static void slip_init(struct net_device *dev, void *data)
struct slip_data *spri; struct slip_data *spri;
struct slip_init *init = data; struct slip_init *init = data;
private = dev->priv; private = netdev_priv(dev);
spri = (struct slip_data *) private->user; spri = (struct slip_data *) private->user;
memset(spri->name, 0, sizeof(spri->name)); memset(spri->name, 0, sizeof(spri->name));
......
...@@ -22,7 +22,7 @@ void slirp_init(struct net_device *dev, void *data) ...@@ -22,7 +22,7 @@ void slirp_init(struct net_device *dev, void *data)
struct slirp_init *init = data; struct slirp_init *init = data;
int i; int i;
private = dev->priv; private = netdev_priv(dev);
spri = (struct slirp_data *) private->user; spri = (struct slirp_data *) private->user;
spri->argw = init->argw; spri->argw = init->argw;
......
...@@ -19,7 +19,7 @@ static void vde_init(struct net_device *dev, void *data) ...@@ -19,7 +19,7 @@ static void vde_init(struct net_device *dev, void *data)
struct uml_net_private *pri; struct uml_net_private *pri;
struct vde_data *vpri; struct vde_data *vpri;
pri = dev->priv; pri = netdev_priv(dev);
vpri = (struct vde_data *) pri->user; vpri = (struct vde_data *) pri->user;
vpri->vde_switch = init->vde_switch; vpri->vde_switch = init->vde_switch;
......
...@@ -22,7 +22,7 @@ static void etap_init(struct net_device *dev, void *data) ...@@ -22,7 +22,7 @@ static void etap_init(struct net_device *dev, void *data)
struct ethertap_data *epri; struct ethertap_data *epri;
struct ethertap_init *init = data; struct ethertap_init *init = data;
pri = dev->priv; pri = netdev_priv(dev);
epri = (struct ethertap_data *) pri->user; epri = (struct ethertap_data *) pri->user;
epri->dev_name = init->dev_name; epri->dev_name = init->dev_name;
epri->gate_addr = init->gate_addr; epri->gate_addr = init->gate_addr;
......
...@@ -21,7 +21,7 @@ static void tuntap_init(struct net_device *dev, void *data) ...@@ -21,7 +21,7 @@ static void tuntap_init(struct net_device *dev, void *data)
struct tuntap_data *tpri; struct tuntap_data *tpri;
struct tuntap_init *init = data; struct tuntap_init *init = data;
pri = dev->priv; pri = netdev_priv(dev);
tpri = (struct tuntap_data *) pri->user; tpri = (struct tuntap_data *) pri->user;
tpri->dev_name = init->dev_name; tpri->dev_name = init->dev_name;
tpri->fixed_config = (init->dev_name != NULL); tpri->fixed_config = (init->dev_name != NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment