diff options
Diffstat (limited to 'drivers/net/via-velocity.c')
-rw-r--r-- | drivers/net/via-velocity.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index cc0addb5640c..c50fdeed9e85 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -3460,21 +3460,19 @@ static int velocity_resume(struct pci_dev *pdev) | |||
3460 | static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) | 3460 | static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) |
3461 | { | 3461 | { |
3462 | struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; | 3462 | struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; |
3463 | struct net_device *dev = ifa->ifa_dev->dev; | ||
3464 | struct velocity_info *vptr; | ||
3465 | unsigned long flags; | ||
3463 | 3466 | ||
3464 | if (ifa) { | 3467 | spin_lock_irqsave(&velocity_dev_list_lock, flags); |
3465 | struct net_device *dev = ifa->ifa_dev->dev; | 3468 | list_for_each_entry(vptr, &velocity_dev_list, list) { |
3466 | struct velocity_info *vptr; | 3469 | if (vptr->dev == dev) { |
3467 | unsigned long flags; | 3470 | velocity_get_ip(vptr); |
3468 | 3471 | break; | |
3469 | spin_lock_irqsave(&velocity_dev_list_lock, flags); | ||
3470 | list_for_each_entry(vptr, &velocity_dev_list, list) { | ||
3471 | if (vptr->dev == dev) { | ||
3472 | velocity_get_ip(vptr); | ||
3473 | break; | ||
3474 | } | ||
3475 | } | 3472 | } |
3476 | spin_unlock_irqrestore(&velocity_dev_list_lock, flags); | ||
3477 | } | 3473 | } |
3474 | spin_unlock_irqrestore(&velocity_dev_list_lock, flags); | ||
3475 | |||
3478 | return NOTIFY_DONE; | 3476 | return NOTIFY_DONE; |
3479 | } | 3477 | } |
3480 | 3478 | ||