static int velocity_suspend(struct pci_dev *pdev, pm_message_t state);
static int velocity_resume(struct pci_dev *pdev);
+static DEFINE_SPINLOCK(velocity_dev_list_lock);
+static LIST_HEAD(velocity_dev_list);
+
+#endif
+
+#if defined(CONFIG_PM) && defined(CONFIG_INET)
+
static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr);
static struct notifier_block velocity_inetaddr_notifier = {
.notifier_call = velocity_netdev_event,
};
-static DEFINE_SPINLOCK(velocity_dev_list_lock);
-static LIST_HEAD(velocity_dev_list);
-
static void velocity_register_notifier(void)
{
register_inetaddr_notifier(&velocity_inetaddr_notifier);
unregister_inetaddr_notifier(&velocity_inetaddr_notifier);
}
-#else /* CONFIG_PM */
+#else
#define velocity_register_notifier() do {} while (0)
#define velocity_unregister_notifier() do {} while (0)
-#endif /* !CONFIG_PM */
+#endif
/*
* Internal board variants. At the moment we have only one
return 0;
}
+#ifdef CONFIG_INET
+
static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
{
struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
}
return NOTIFY_DONE;
}
+
+#endif
#endif