summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed03ef8)
raw | patch | inline | side by side (parent: ed03ef8)
author | Hauke Mehrtens <hauke@hauke-m.de> | |
Tue, 4 Oct 2011 11:11:09 +0000 (13:11 +0200) | ||
committer | Luis R. Rodriguez <mcgrof@qca.qualcomm.com> | |
Wed, 5 Oct 2011 00:41:03 +0000 (17:41 -0700) |
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/29-sdio_no_suspend.patch | patch | blob | history |
index cb2fbedf6fe857fd88169295dfd349bcce2db890..5cc26a1ba43c8734a444d6578c2e2d29cd494bc7 100644 (file)
--- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
-@@ -45,7 +45,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 */
-@@ -58,7 +58,7 @@ static const struct sdio_device_id brcmf
- { /* end: all zeroes */ },
- };
-
+@@ -55,7 +55,7 @@ static bool
+ brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev)
+ {
+ bool is_err = false;
-#ifdef CONFIG_PM_SLEEP
+#if defined(CONFIG_PM_SLEEP) && (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,
-@@ -70,7 +70,7 @@ static struct sdio_driver brcmf_sdmmc_dr
- .remove = brcmf_ops_sdio_remove,
- .name = "brcmfmac",
- .id_table = brcmf_sdmmc_ids,
+ is_err = atomic_read(&sdiodev->suspend);
+ #endif
+ return is_err;
+@@ -64,7 +64,7 @@ brcmf_pm_resume_error(struct brcmf_sdio_
+ static void
+ brcmf_pm_resume_wait(struct brcmf_sdio_dev *sdiodev, wait_queue_head_t *wq)
+ {
-#ifdef CONFIG_PM_SLEEP
+#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
- .drv = {
- .pm = &brcmf_sdio_pm_ops,
- },
-@@ -623,7 +623,7 @@ static void brcmf_ops_sdio_remove(struct
+ int retry = 0;
+ while (atomic_read(&sdiodev->suspend) && retry++ != 30)
+ wait_event_timeout(*wq, false, HZ/100);
+@@ -564,7 +564,7 @@ static void brcmf_ops_sdio_remove(struct
+ }
}
-
-#ifdef CONFIG_PM_SLEEP
+#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
static int brcmf_sdio_suspend(struct device *dev)
{
mmc_pm_flag_t sdio_flags;
+@@ -617,7 +617,7 @@ static struct sdio_driver brcmf_sdmmc_dr
+ .remove = brcmf_ops_sdio_remove,
+ .name = "brcmfmac",
+ .id_table = brcmf_sdmmc_ids,
+-#ifdef CONFIG_PM_SLEEP
++#if defined(CONFIG_PM_SLEEP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ .drv = {
+ .pm = &brcmf_sdio_pm_ops,
+ },