aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/via-velocity.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/via-velocity.c')
-rw-r--r--drivers/net/via-velocity.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 4587f23f4e4b..8e5d82051bd4 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -265,15 +265,19 @@ static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status);
265static int velocity_suspend(struct pci_dev *pdev, pm_message_t state); 265static int velocity_suspend(struct pci_dev *pdev, pm_message_t state);
266static int velocity_resume(struct pci_dev *pdev); 266static int velocity_resume(struct pci_dev *pdev);
267 267
268static DEFINE_SPINLOCK(velocity_dev_list_lock);
269static LIST_HEAD(velocity_dev_list);
270
271#endif
272
273#if defined(CONFIG_PM) && defined(CONFIG_INET)
274
268static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr); 275static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr);
269 276
270static struct notifier_block velocity_inetaddr_notifier = { 277static struct notifier_block velocity_inetaddr_notifier = {
271 .notifier_call = velocity_netdev_event, 278 .notifier_call = velocity_netdev_event,
272}; 279};
273 280
274static DEFINE_SPINLOCK(velocity_dev_list_lock);
275static LIST_HEAD(velocity_dev_list);
276
277static void velocity_register_notifier(void) 281static void velocity_register_notifier(void)
278{ 282{
279 register_inetaddr_notifier(&velocity_inetaddr_notifier); 283 register_inetaddr_notifier(&velocity_inetaddr_notifier);
@@ -284,12 +288,12 @@ static void velocity_unregister_notifier(void)
284 unregister_inetaddr_notifier(&velocity_inetaddr_notifier); 288 unregister_inetaddr_notifier(&velocity_inetaddr_notifier);
285} 289}
286 290
287#else /* CONFIG_PM */ 291#else
288 292
289#define velocity_register_notifier() do {} while (0) 293#define velocity_register_notifier() do {} while (0)
290#define velocity_unregister_notifier() do {} while (0) 294#define velocity_unregister_notifier() do {} while (0)
291 295
292#endif /* !CONFIG_PM */ 296#endif
293 297
294/* 298/*
295 * Internal board variants. At the moment we have only one 299 * Internal board variants. At the moment we have only one
@@ -3292,6 +3296,8 @@ static int velocity_resume(struct pci_dev *pdev)
3292 return 0; 3296 return 0;
3293} 3297}
3294 3298
3299#ifdef CONFIG_INET
3300
3295static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) 3301static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
3296{ 3302{
3297 struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; 3303 struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
@@ -3312,4 +3318,6 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi
3312 } 3318 }
3313 return NOTIFY_DONE; 3319 return NOTIFY_DONE;
3314} 3320}
3321
3322#endif
3315#endif 3323#endif