compat-drivers: add old suspend/resume handlers only when function is available
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 27 Dec 2012 17:28:21 +0000 (18:28 +0100)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 28 Dec 2012 15:39:09 +0000 (07:39 -0800)
All the suspend resume functions are only activated when
CONFIG_PM_SLEEP is set and not when CONFIG_PM is set.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
patches/collateral-evolutions/network/11-dev-pm-ops.patch

index acae45e6f677de299ba139de1e3c9c657a5b53ec..4afd3084b5e14e7e2697a5a7dda71795d88aec3f 100644 (file)
@@ -25,7 +25,7 @@ calls on compat code with only slight modifications.
        .remove = bcma_host_pci_remove,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm = BCMA_PM_OPS,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend = bcma_host_pci_suspend_compat,
 +      .resume = bcma_host_pci_resume_compat,
 +#endif
@@ -125,7 +125,7 @@ calls on compat code with only slight modifications.
        .remove     = ath_pci_remove,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm  = ATH9K_PM_OPS,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend    = ath_pci_suspend_compat,
 +      .resume     = ath_pci_resume_compat,
 +#endif
@@ -217,7 +217,7 @@ calls on compat code with only slight modifications.
        .remove = iwl_pci_remove,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm = IWL_PM_OPS,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend = iwl_pci_suspend_compat,
 +      .resume = iwl_pci_resume_compat,
 +#endif
@@ -270,7 +270,7 @@ calls on compat code with only slight modifications.
        .remove = rtl_pci_disconnect,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm = &rtlwifi_pm_ops,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend    = rtl_pci_suspend_compat,
 +      .resume     = rtl_pci_resume_compat,
 +#endif
@@ -295,7 +295,7 @@ calls on compat code with only slight modifications.
        .remove = rtl_pci_disconnect,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm = &rtlwifi_pm_ops,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend    = rtl_pci_suspend_compat,
 +      .resume     = rtl_pci_resume_compat,
 +#endif
@@ -320,7 +320,7 @@ calls on compat code with only slight modifications.
        .remove = rtl_pci_disconnect,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm = &rtlwifi_pm_ops,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend    = rtl_pci_suspend_compat,
 +      .resume     = rtl_pci_resume_compat,
 +#endif
@@ -345,7 +345,7 @@ calls on compat code with only slight modifications.
        .remove = rtl_pci_disconnect,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm = &rtlwifi_pm_ops,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend    = rtl_pci_suspend_compat,
 +      .resume     = rtl_pci_resume_compat,
 +#endif
@@ -370,7 +370,7 @@ calls on compat code with only slight modifications.
        .remove         = p54p_remove,
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
        .driver.pm      = P54P_PM_OPS,
-+#elif defined(CONFIG_PM)
++#elif defined(CONFIG_PM_SLEEP)
 +      .suspend    = p54p_suspend_compat,
 +      .resume     = p54p_resume_compat,
 +#endif