From ddd6fa7e794e62af3ec3eb4ffdc78489885701f2 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Thu, 23 Jun 2011 13:40:26 +0300 Subject: mmc: block: switch card to User Data Area when removing the block driver The MMC block driver and other drivers (e.g. mmc-test) will expect the card to be switched to the User Data Area eMMC partition when they start. Hence the MMC block driver should ensure it is that way when it is removed. Signed-off-by: Adrian Hunter Cc: Andrei Warkentin Signed-off-by: Chris Ball --- drivers/mmc/card/block.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 71da5641e25..77cd083a51e 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1297,6 +1297,9 @@ static void mmc_blk_remove(struct mmc_card *card) struct mmc_blk_data *md = mmc_get_drvdata(card); mmc_blk_remove_parts(card, md); + mmc_claim_host(card->host); + mmc_blk_part_switch(card, md); + mmc_release_host(card->host); mmc_blk_remove_req(md); mmc_set_drvdata(card, NULL); } -- cgit v1.2.3