aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/mmc.c2
-rw-r--r--drivers/mmc/mmc_sysfs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index ccd3037da24..9ffeeb2cba4 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1604,8 +1604,6 @@ static void mmc_rescan(struct work_struct *work)
if (!mmc_card_present(card) && !mmc_card_dead(card)) {
if (mmc_register_card(card))
mmc_card_set_dead(card);
- else
- mmc_card_set_present(card);
}
/*
diff --git a/drivers/mmc/mmc_sysfs.c b/drivers/mmc/mmc_sysfs.c
index e0e82d849d5..06f264b2f79 100644
--- a/drivers/mmc/mmc_sysfs.c
+++ b/drivers/mmc/mmc_sysfs.c
@@ -217,6 +217,8 @@ int mmc_register_card(struct mmc_card *card)
device_del(&card->dev);
}
}
+ if (ret == 0)
+ mmc_card_set_present(card);
return ret;
}