X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fvia-velocity.c;h=8e5d82051bd4f94f42c91b711793b23a1f9825c3;hb=551a10c7fc14640d484ee3dda699758041d8123f;hp=74f894795a1b5ed154d8821b1a16ecb44d5124eb;hpb=513b046c96cc2fbce730a3474f6f7ff0c4fdd05c;p=powerpc.git diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 74f894795a..8e5d82051b 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 @@ -3132,7 +3136,7 @@ static u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern) } /* Finally, invert the result once to get the correct data */ crc = ~crc; - return bitreverse(crc) >> 16; + return bitrev32(crc) >> 16; } /** @@ -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