Commit 48ed6ff8 authored by Roger Luethi's avatar Roger Luethi Committed by Jeff Garzik

[netdrvr ns83820] fix oops, initialize dev->priv to prevent future slipups like this

parent 443d4171
...@@ -1215,7 +1215,7 @@ static int ns83820_ethtool_ioctl (struct ns83820 *dev, void *useraddr) ...@@ -1215,7 +1215,7 @@ static int ns83820_ethtool_ioctl (struct ns83820 *dev, void *useraddr)
static int ns83820_ioctl(struct net_device *_dev, struct ifreq *rq, int cmd) static int ns83820_ioctl(struct net_device *_dev, struct ifreq *rq, int cmd)
{ {
struct ns83820 *dev = _dev->priv; struct ns83820 *dev = (struct ns83820 *)_dev;
switch(cmd) { switch(cmd) {
case SIOCETHTOOL: case SIOCETHTOOL:
...@@ -1788,6 +1788,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ ...@@ -1788,6 +1788,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
dev->ee.cache = &dev->MEAR_cache; dev->ee.cache = &dev->MEAR_cache;
dev->ee.lock = &dev->misc_lock; dev->ee.lock = &dev->misc_lock;
dev->net_dev.owner = THIS_MODULE; dev->net_dev.owner = THIS_MODULE;
dev->net_dev.priv = dev;
INIT_WORK(&dev->tq_refill, queue_refill, dev); INIT_WORK(&dev->tq_refill, queue_refill, dev);
tasklet_init(&dev->rx_tasklet, rx_action, (unsigned long)dev); tasklet_init(&dev->rx_tasklet, rx_action, (unsigned long)dev);
......
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