diff options
Diffstat (limited to 'drivers/net')
-rwxr-xr-x | drivers/net/wireless/bcmdhd/dhd_linux.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index fad47e582e07..a50b365693df 100755 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -595,7 +595,8 @@ static int dhd_wakelock_waive(dhd_info_t *dhdinfo); static int dhd_wakelock_restore(dhd_info_t *dhdinfo); #endif -#if defined(CONFIG_PM_SLEEP) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && (LINUX_VERSION_CODE <= \ + KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP) static int dhd_pm_callback(struct notifier_block *nfb, unsigned long action, void *ignored) { int ret = NOTIFY_DONE; @@ -640,7 +641,7 @@ static bool dhd_pm_notifier_registered = FALSE; extern int register_pm_notifier(struct notifier_block *nb); extern int unregister_pm_notifier(struct notifier_block *nb); -#endif /* CONFIG_PM_SLEEP */ +#endif /* (LINUX_VERSION >= 2.6.27 && LINUX_VERSION <= 2.6.39 && CONFIG_PM_SLEEP) */ /* Request scheduling of the bus rx frame */ static void dhd_sched_rxf(dhd_pub_t *dhdp, void *skb); @@ -3532,14 +3533,15 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen) */ memcpy(netdev_priv(net), &dhd, sizeof(dhd)); -#if defined(CONFIG_PM_SLEEP) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && (LINUX_VERSION_CODE <= \ + KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP) dhd->pm_notifier.notifier_call = dhd_pm_callback; dhd->pm_notifier.priority = 10; if (!dhd_pm_notifier_registered) { dhd_pm_notifier_registered = TRUE; register_pm_notifier(&dhd->pm_notifier); } -#endif /* CONFIG_PM_SLEEP */ +#endif /* (LINUX_VERSION >= 2.6.27 && LINUX_VERSION <= 2.6.39 && CONFIG_PM_SLEEP) */ #if defined(CONFIG_HAS_EARLYSUSPEND) && defined(DHD_USE_EARLYSUSPEND) dhd->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20; @@ -5141,12 +5143,13 @@ void dhd_detach(dhd_pub_t *dhdp) if (dhdp->pno_state) dhd_pno_deinit(dhdp); #endif -#if defined(CONFIG_PM_SLEEP) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && (LINUX_VERSION_CODE <= \ + KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP) if (dhd_pm_notifier_registered) { unregister_pm_notifier(&dhd->pm_notifier); dhd_pm_notifier_registered = FALSE; } -#endif /* CONFIG_PM_SLEEP */ +#endif /* (LINUX_VERSION >= 2.6.27 && LINUX_VERSION <= 2.6.39 && CONFIG_PM_SLEEP) */ #ifdef DEBUG_CPU_FREQ if (dhd->new_freq) free_percpu(dhd->new_freq); |