compat-wireless: deactivate sido suspend for brcmfmac on older kernels.
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 18 Jul 2011 17:36:13 +0000 (19:36 +0200)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 20 Jul 2011 01:10:21 +0000 (18:10 -0700)
With this patch the build does not break any more because of this commit:

commit da68c4eb258cd9f3f0b8aeb7e46b8118bb6358b6
Author: Nicolas Pitre <nico@fluxnic.net>
Date:   Fri Mar 5 13:43:31 2010 -0800

    sdio: introduce API for special power management features

This build error occurs without the patch on linux-2.6.32.
/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c: In function ‘brcmf_sdio_suspend’:
/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:1087:2: error: ‘mmc_pm_flag_t’ undeclared (first use in this function)
/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:1087:2: note: each undeclared identifier is reported only once for each function it appears in
/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:1087:16: error: expected ‘;’ before ‘sdio_flags’
/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:1088:2: warning: ISO C90 forbids mixed declarations and code
/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:1092:2: error: ‘sdio_flags’ undeclared (first use in this function)
/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c:1092:2: error: implicit declaration of function ‘sdio_get_host_pm_caps’

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/29-sdio_no_suspend.patch

index d6a67132f482cfe55fe874742e950464306b2249..e94074593a11a09fa64fee754ded4e4403282d4c 100644 (file)
@@ -84,3 +84,41 @@ suspend and resume that are not backported.
        }
  };
  
+--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
++++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+@@ -127,7 +127,7 @@ static int brcmf_ops_sdio_probe(struct s
+                               const struct sdio_device_id *id);
+ static void brcmf_ops_sdio_remove(struct sdio_func *func);
+-#ifdef CONFIG_PM
++#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ static int brcmf_sdio_suspend(struct device *dev);
+ static int brcmf_sdio_resume(struct device *dev);
+ #endif /* CONFIG_PM */
+@@ -157,7 +157,7 @@ static const struct sdio_device_id brcmf
+       { /* end: all zeroes */ },
+ };
+-#ifdef CONFIG_PM
++#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ static const struct dev_pm_ops brcmf_sdio_pm_ops = {
+       .suspend        = brcmf_sdio_suspend,
+       .resume         = brcmf_sdio_resume,
+@@ -169,7 +169,7 @@ static struct sdio_driver brcmf_sdmmc_dr
+       .remove = brcmf_ops_sdio_remove,
+       .name = "brcmfmac",
+       .id_table = brcmf_sdmmc_ids,
+-#ifdef CONFIG_PM
++#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+       .drv = {
+               .pm = &brcmf_sdio_pm_ops,
+       },
+@@ -1081,7 +1081,7 @@ static void brcmf_ops_sdio_remove(struct
+ }
+-#ifdef CONFIG_PM
++#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ static int brcmf_sdio_suspend(struct device *dev)
+ {
+       mmc_pm_flag_t sdio_flags;