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 <drzeus@drzeus.cx>
This commit is contained in:
Pierre Ossman 2007-04-28 17:30:50 +02:00
Родитель d2b46f66b4
Коммит b5af25bee2
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -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;
}