Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b5af25bee2de2f6cd1ac74ba737cbc4f3d303e5d
Commit:     b5af25bee2de2f6cd1ac74ba737cbc4f3d303e5d
Parent:     d2b46f66b4b342be07a4194bd5e82384d07e470d
Author:     Pierre Ossman <[EMAIL PROTECTED]>
AuthorDate: Sat Apr 28 17:30:50 2007 +0200
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Tue May 1 13:04:18 2007 +0200

    mmc: remove card upon suspend
    
    Suspending MMC/SD cards (versus removing and readding them) is an
    inherently unsafe operation and has even been broken for some time.
    
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 drivers/mmc/mmc.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 0242c6a..94c0472 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1738,10 +1738,17 @@ EXPORT_SYMBOL(mmc_free_host);
  */
 int mmc_suspend_host(struct mmc_host *host, pm_message_t state)
 {
-       mmc_claim_host(host);
-       mmc_deselect_cards(host);
+       struct list_head *l, *n;
+
+       mmc_flush_scheduled_work();
+
+       list_for_each_safe(l, n, &host->cards) {
+               struct mmc_card *card = mmc_list_to_card(l);
+
+               mmc_remove_card(card);
+       }
+
        mmc_power_off(host);
-       mmc_release_host(host);
 
        return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to