OSDN Git Service

net: wireless: bcmdhd: Allow Improved suspend/resume processing on 2.6.39
authorDmitry Shmidt <dimitrysh@google.com>
Mon, 5 Mar 2012 21:25:48 +0000 (13:25 -0800)
committerDmitry Shmidt <dimitrysh@google.com>
Wed, 14 Mar 2012 23:36:01 +0000 (16:36 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c
drivers/net/wireless/bcmdhd/dhd_linux.c
drivers/net/wireless/bcmdhd/wl_android.c

index f296dd3..355b43b 100644 (file)
@@ -170,7 +170,7 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
 
 MODULE_DEVICE_TABLE(sdio, bcmsdh_sdmmc_ids);
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
 static int bcmsdh_sdmmc_suspend(struct device *pdev)
 {
        struct sdio_func *func = dev_to_sdio_func(pdev);
@@ -211,18 +211,18 @@ static const struct dev_pm_ops bcmsdh_sdmmc_pm_ops = {
        .suspend        = bcmsdh_sdmmc_suspend,
        .resume         = bcmsdh_sdmmc_resume,
 };
-#endif  /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
+#endif  /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
 
 static struct sdio_driver bcmsdh_sdmmc_driver = {
        .probe          = bcmsdh_sdmmc_probe,
        .remove         = bcmsdh_sdmmc_remove,
        .name           = "bcmsdh_sdmmc",
        .id_table       = bcmsdh_sdmmc_ids,
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
        .drv = {
                .pm     = &bcmsdh_sdmmc_pm_ops,
        },
-#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
 };
 
 struct sdos_info {
index 9e1071f..7006860 100644 (file)
@@ -471,7 +471,7 @@ static int dhd_sleep_pm_callback(struct notifier_block *nfb, unsigned long actio
 {
        int ret = NOTIFY_DONE;
 
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39))
        switch (action) {
                case PM_HIBERNATION_PREPARE:
                case PM_SUSPEND_PREPARE:
index 3b75448..7b5dd8a 100644 (file)
@@ -795,7 +795,7 @@ static int wifi_remove(struct platform_device *pdev)
 static int wifi_suspend(struct platform_device *pdev, pm_message_t state)
 {
        DHD_TRACE(("##> %s\n", __FUNCTION__));
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY)
        bcmsdh_oob_intr_set(0);
 #endif
        return 0;
@@ -804,7 +804,7 @@ static int wifi_suspend(struct platform_device *pdev, pm_message_t state)
 static int wifi_resume(struct platform_device *pdev)
 {
        DHD_TRACE(("##> %s\n", __FUNCTION__));
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY)
        if (dhd_os_check_if_up(bcmsdh_get_drvdata()))
                bcmsdh_oob_intr_set(1);
 #endif