Commit 25dd7e6aedff054736f9edfd05bb585d810d8543

Authored by Wang Chen
Committed by David S. Miller
1 parent 5240488198

hysdn: Kill directly reference of netdev->priv

Usually, netdev->priv should point to the memory of private
data which is allocated in alloc_netdev().
netdev_priv() is used to get the address of the private data.

Change the netdev->priv pointer to another memory is wrong.
Use netdev->ml_priv for this case.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

drivers/isdn/hysdn/hysdn_net.c
... ... @@ -76,7 +76,7 @@
76 76 net_open(struct net_device *dev)
77 77 {
78 78 struct in_device *in_dev;
79   - hysdn_card *card = dev->priv;
  79 + hysdn_card *card = dev->ml_priv;
80 80 int i;
81 81  
82 82 netif_start_queue(dev); /* start tx-queueing */
... ... @@ -159,7 +159,7 @@
159 159 spin_unlock_irq(&lp->lock);
160 160  
161 161 if (lp->sk_count <= 3) {
162   - schedule_work(&((hysdn_card *) dev->priv)->irq_queue);
  162 + schedule_work(&((hysdn_card *) dev->ml_priv)->irq_queue);
163 163 }
164 164 return (0); /* success */
165 165 } /* net_send_packet */
... ... @@ -295,7 +295,7 @@
295 295 kfree(dev);
296 296 return (i);
297 297 }
298   - dev->priv = card; /* remember pointer to own data structure */
  298 + dev->ml_priv = card; /* remember pointer to own data structure */
299 299 card->netif = dev; /* setup the local pointer */
300 300  
301 301 if (card->debug_flags & LOG_NET_INIT)