diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-12-04 18:07:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 18:07:33 -0500 |
commit | 17c324fa80914e5b39d423dfd1a3cd61a3ec9866 (patch) | |
tree | b8a4d8ed638870ded8efa116cf9d1c8cab62b3bd /arch/um/drivers | |
parent | 6cbeba55c5cbd042040d6114471637e8b10d4a6b (diff) |
um: Kill directly reference of netdev->priv
Simply replace netdev->priv with netdev_priv().
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/daemon_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/mcast_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/net_kern.c | 22 | ||||
-rw-r--r-- | arch/um/drivers/pcap_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/slip_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/slirp_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/vde_kern.c | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c index d53ff52bb404..b4a1522f2157 100644 --- a/arch/um/drivers/daemon_kern.c +++ b/arch/um/drivers/daemon_kern.c | |||
@@ -22,7 +22,7 @@ static void daemon_init(struct net_device *dev, void *data) | |||
22 | struct daemon_data *dpri; | 22 | struct daemon_data *dpri; |
23 | struct daemon_init *init = data; | 23 | struct daemon_init *init = data; |
24 | 24 | ||
25 | pri = dev->priv; | 25 | pri = netdev_priv(dev); |
26 | dpri = (struct daemon_data *) pri->user; | 26 | dpri = (struct daemon_data *) pri->user; |
27 | dpri->sock_type = init->sock_type; | 27 | dpri->sock_type = init->sock_type; |
28 | dpri->ctl_sock = init->ctl_sock; | 28 | dpri->ctl_sock = init->ctl_sock; |
diff --git a/arch/um/drivers/mcast_kern.c b/arch/um/drivers/mcast_kern.c index 8c4378a76d63..ffc6416d5ed7 100644 --- a/arch/um/drivers/mcast_kern.c +++ b/arch/um/drivers/mcast_kern.c | |||
@@ -28,7 +28,7 @@ static void mcast_init(struct net_device *dev, void *data) | |||
28 | struct mcast_data *dpri; | 28 | struct mcast_data *dpri; |
29 | struct mcast_init *init = data; | 29 | struct mcast_init *init = data; |
30 | 30 | ||
31 | pri = dev->priv; | 31 | pri = netdev_priv(dev); |
32 | dpri = (struct mcast_data *) pri->user; | 32 | dpri = (struct mcast_data *) pri->user; |
33 | dpri->addr = init->addr; | 33 | dpri->addr = init->addr; |
34 | dpri->port = init->port; | 34 | dpri->port = init->port; |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 74f1a1787026..fde510b664d3 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -76,7 +76,7 @@ out: | |||
76 | 76 | ||
77 | static int uml_net_rx(struct net_device *dev) | 77 | static int uml_net_rx(struct net_device *dev) |
78 | { | 78 | { |
79 | struct uml_net_private *lp = dev->priv; | 79 | struct uml_net_private *lp = netdev_priv(dev); |
80 | int pkt_len; | 80 | int pkt_len; |
81 | struct sk_buff *skb; | 81 | struct sk_buff *skb; |
82 | 82 | ||
@@ -119,7 +119,7 @@ static void uml_dev_close(struct work_struct *work) | |||
119 | static irqreturn_t uml_net_interrupt(int irq, void *dev_id) | 119 | static irqreturn_t uml_net_interrupt(int irq, void *dev_id) |
120 | { | 120 | { |
121 | struct net_device *dev = dev_id; | 121 | struct net_device *dev = dev_id; |
122 | struct uml_net_private *lp = dev->priv; | 122 | struct uml_net_private *lp = netdev_priv(dev); |
123 | int err; | 123 | int err; |
124 | 124 | ||
125 | if (!netif_running(dev)) | 125 | if (!netif_running(dev)) |
@@ -150,7 +150,7 @@ out: | |||
150 | 150 | ||
151 | static int uml_net_open(struct net_device *dev) | 151 | static int uml_net_open(struct net_device *dev) |
152 | { | 152 | { |
153 | struct uml_net_private *lp = dev->priv; | 153 | struct uml_net_private *lp = netdev_priv(dev); |
154 | int err; | 154 | int err; |
155 | 155 | ||
156 | if (lp->fd >= 0) { | 156 | if (lp->fd >= 0) { |
@@ -195,7 +195,7 @@ out: | |||
195 | 195 | ||
196 | static int uml_net_close(struct net_device *dev) | 196 | static int uml_net_close(struct net_device *dev) |
197 | { | 197 | { |
198 | struct uml_net_private *lp = dev->priv; | 198 | struct uml_net_private *lp = netdev_priv(dev); |
199 | 199 | ||
200 | netif_stop_queue(dev); | 200 | netif_stop_queue(dev); |
201 | 201 | ||
@@ -213,7 +213,7 @@ static int uml_net_close(struct net_device *dev) | |||
213 | 213 | ||
214 | static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) | 214 | static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) |
215 | { | 215 | { |
216 | struct uml_net_private *lp = dev->priv; | 216 | struct uml_net_private *lp = netdev_priv(dev); |
217 | unsigned long flags; | 217 | unsigned long flags; |
218 | int len; | 218 | int len; |
219 | 219 | ||
@@ -250,7 +250,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
250 | 250 | ||
251 | static struct net_device_stats *uml_net_get_stats(struct net_device *dev) | 251 | static struct net_device_stats *uml_net_get_stats(struct net_device *dev) |
252 | { | 252 | { |
253 | struct uml_net_private *lp = dev->priv; | 253 | struct uml_net_private *lp = netdev_priv(dev); |
254 | return &lp->stats; | 254 | return &lp->stats; |
255 | } | 255 | } |
256 | 256 | ||
@@ -267,7 +267,7 @@ static void uml_net_tx_timeout(struct net_device *dev) | |||
267 | 267 | ||
268 | static int uml_net_set_mac(struct net_device *dev, void *addr) | 268 | static int uml_net_set_mac(struct net_device *dev, void *addr) |
269 | { | 269 | { |
270 | struct uml_net_private *lp = dev->priv; | 270 | struct uml_net_private *lp = netdev_priv(dev); |
271 | struct sockaddr *hwaddr = addr; | 271 | struct sockaddr *hwaddr = addr; |
272 | 272 | ||
273 | spin_lock_irq(&lp->lock); | 273 | spin_lock_irq(&lp->lock); |
@@ -368,7 +368,7 @@ static void net_device_release(struct device *dev) | |||
368 | { | 368 | { |
369 | struct uml_net *device = dev->driver_data; | 369 | struct uml_net *device = dev->driver_data; |
370 | struct net_device *netdev = device->dev; | 370 | struct net_device *netdev = device->dev; |
371 | struct uml_net_private *lp = netdev->priv; | 371 | struct uml_net_private *lp = netdev_priv(netdev); |
372 | 372 | ||
373 | if (lp->remove != NULL) | 373 | if (lp->remove != NULL) |
374 | (*lp->remove)(&lp->user); | 374 | (*lp->remove)(&lp->user); |
@@ -420,7 +420,7 @@ static void eth_configure(int n, void *init, char *mac, | |||
420 | 420 | ||
421 | printk(KERN_INFO "Netdevice %d (%pM) : ", n, device->mac); | 421 | printk(KERN_INFO "Netdevice %d (%pM) : ", n, device->mac); |
422 | 422 | ||
423 | lp = dev->priv; | 423 | lp = netdev_priv(dev); |
424 | /* This points to the transport private data. It's still clear, but we | 424 | /* This points to the transport private data. It's still clear, but we |
425 | * must memset it to 0 *now*. Let's help the drivers. */ | 425 | * must memset it to 0 *now*. Let's help the drivers. */ |
426 | memset(lp, 0, size); | 426 | memset(lp, 0, size); |
@@ -730,7 +730,7 @@ static int net_remove(int n, char **error_out) | |||
730 | return -ENODEV; | 730 | return -ENODEV; |
731 | 731 | ||
732 | dev = device->dev; | 732 | dev = device->dev; |
733 | lp = dev->priv; | 733 | lp = netdev_priv(dev); |
734 | if (lp->fd > 0) | 734 | if (lp->fd > 0) |
735 | return -EBUSY; | 735 | return -EBUSY; |
736 | unregister_netdev(dev); | 736 | unregister_netdev(dev); |
@@ -761,7 +761,7 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event, | |||
761 | if (dev->open != uml_net_open) | 761 | if (dev->open != uml_net_open) |
762 | return NOTIFY_DONE; | 762 | return NOTIFY_DONE; |
763 | 763 | ||
764 | lp = dev->priv; | 764 | lp = netdev_priv(dev); |
765 | 765 | ||
766 | proc = NULL; | 766 | proc = NULL; |
767 | switch (event) { | 767 | switch (event) { |
diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c index 3a750dd39be1..2860525f8ff6 100644 --- a/arch/um/drivers/pcap_kern.c +++ b/arch/um/drivers/pcap_kern.c | |||
@@ -21,7 +21,7 @@ void pcap_init(struct net_device *dev, void *data) | |||
21 | struct pcap_data *ppri; | 21 | struct pcap_data *ppri; |
22 | struct pcap_init *init = data; | 22 | struct pcap_init *init = data; |
23 | 23 | ||
24 | pri = dev->priv; | 24 | pri = netdev_priv(dev); |
25 | ppri = (struct pcap_data *) pri->user; | 25 | ppri = (struct pcap_data *) pri->user; |
26 | ppri->host_if = init->host_if; | 26 | ppri->host_if = init->host_if; |
27 | ppri->promisc = init->promisc; | 27 | ppri->promisc = init->promisc; |
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index d19faec7046e..5ec17563142e 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c | |||
@@ -19,7 +19,7 @@ static void slip_init(struct net_device *dev, void *data) | |||
19 | struct slip_data *spri; | 19 | struct slip_data *spri; |
20 | struct slip_init *init = data; | 20 | struct slip_init *init = data; |
21 | 21 | ||
22 | private = dev->priv; | 22 | private = netdev_priv(dev); |
23 | spri = (struct slip_data *) private->user; | 23 | spri = (struct slip_data *) private->user; |
24 | 24 | ||
25 | memset(spri->name, 0, sizeof(spri->name)); | 25 | memset(spri->name, 0, sizeof(spri->name)); |
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c index d987af277db9..f15a6e7654f3 100644 --- a/arch/um/drivers/slirp_kern.c +++ b/arch/um/drivers/slirp_kern.c | |||
@@ -22,7 +22,7 @@ void slirp_init(struct net_device *dev, void *data) | |||
22 | struct slirp_init *init = data; | 22 | struct slirp_init *init = data; |
23 | int i; | 23 | int i; |
24 | 24 | ||
25 | private = dev->priv; | 25 | private = netdev_priv(dev); |
26 | spri = (struct slirp_data *) private->user; | 26 | spri = (struct slirp_data *) private->user; |
27 | 27 | ||
28 | spri->argw = init->argw; | 28 | spri->argw = init->argw; |
diff --git a/arch/um/drivers/vde_kern.c b/arch/um/drivers/vde_kern.c index add7e722defb..1b852bffdebc 100644 --- a/arch/um/drivers/vde_kern.c +++ b/arch/um/drivers/vde_kern.c | |||
@@ -19,7 +19,7 @@ static void vde_init(struct net_device *dev, void *data) | |||
19 | struct uml_net_private *pri; | 19 | struct uml_net_private *pri; |
20 | struct vde_data *vpri; | 20 | struct vde_data *vpri; |
21 | 21 | ||
22 | pri = dev->priv; | 22 | pri = netdev_priv(dev); |
23 | vpri = (struct vde_data *) pri->user; | 23 | vpri = (struct vde_data *) pri->user; |
24 | 24 | ||
25 | vpri->vde_switch = init->vde_switch; | 25 | vpri->vde_switch = init->vde_switch; |