# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/09/13 12:47:24+09:00 tj@xxxxxxxxxxxxxxxx # velocity_nics wasn't managed properly. Fixed. # # drivers/net/via-velocity.c # 2004/09/13 12:47:12+09:00 tj@xxxxxxxxxxxxxxxx +5 -2 # velocity_nics wasn't managed properly. Fixed. # diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c 2004-09-13 13:48:15 +09:00 +++ b/drivers/net/via-velocity.c 2004-09-13 13:48:15 +09:00 @@ -359,6 +359,8 @@ pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); free_netdev(dev); + + velocity_nics--; } /** @@ -695,7 +697,7 @@ struct mac_regs * regs; int ret = -ENOMEM; - if (velocity_nics++ >= MAX_UNITS) { + if (velocity_nics >= MAX_UNITS) { printk(KERN_NOTICE VELOCITY_NAME ": already found %d NICs.\n", velocity_nics); return -ENODEV; @@ -762,7 +764,7 @@ dev->dev_addr[i] = readb(®s->PAR[i]); - velocity_get_options(&vptr->options, velocity_nics - 1, dev->name); + velocity_get_options(&vptr->options, velocity_nics, dev->name); /* * Mask out the options cannot be set to the chip @@ -817,6 +819,7 @@ spin_unlock_irqrestore(&velocity_dev_list_lock, flags); } #endif + velocity_nics++; out: return ret;