Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce9f7fe3c3f5b9ed1d3e91db78c45d0df5672816
Commit:     ce9f7fe3c3f5b9ed1d3e91db78c45d0df5672816
Parent:     683a2aa339f607c8a422835161ceab68b2a5a18a
Author:     Randy Dunlap <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 18 21:21:10 2006 -0800
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Dec 26 16:28:20 2006 -0500

    via-velocity uses INET interfaces
    
    via-velocity doesn't build when CONFIG_INET=n:
    
    drivers/built-in.o: In function `velocity_unregister_notifier':
    via-velocity.c:(.text+0xe9b46): undefined reference to 
`unregister_inetaddr_notifier'
    drivers/built-in.o: In function `velocity_init_module':
    via-velocity.c:(.init.text+0xa027): undefined reference to 
`register_inetaddr_notifier'
    
    I wanted to make this change in drivers/net/Kconfig, but
    this isn't legal kconfig language:
    
     config VIA_VELOCITY
            tristate "VIA Velocity support"
            depends on NET_PCI && PCI
    +       depends on INET if PM
            select CRC32
            select CRC_CCITT
            select MII
    
    so fix it in via-velocity.c instead.
    Builds with all 4 combinations of CONFIG_NET & CONFIG_PM.
    
    Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/via-velocity.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 4587f23..8e5d820 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);
 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);
@@ -284,12 +288,12 @@ static void velocity_unregister_notifier(void)
        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
@@ -3292,6 +3296,8 @@ static int velocity_resume(struct pci_dev *pdev)
        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;
@@ -3312,4 +3318,6 @@ static int velocity_netdev_event(struct notifier_block 
*nb, unsigned long notifi
        }
        return NOTIFY_DONE;
 }
+
+#endif
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to