Commit 29041dbe authored by Pierre Ossman's avatar Pierre Ossman

mmc: Move "present" marking

The "present" state indicates that the card is a registered device, so
it is more clear to put it together with the actual registration.
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent f74d132c
...@@ -1604,8 +1604,6 @@ static void mmc_rescan(struct work_struct *work) ...@@ -1604,8 +1604,6 @@ static void mmc_rescan(struct work_struct *work)
if (!mmc_card_present(card) && !mmc_card_dead(card)) { if (!mmc_card_present(card) && !mmc_card_dead(card)) {
if (mmc_register_card(card)) if (mmc_register_card(card))
mmc_card_set_dead(card); mmc_card_set_dead(card);
else
mmc_card_set_present(card);
} }
/* /*
......
...@@ -217,6 +217,8 @@ int mmc_register_card(struct mmc_card *card) ...@@ -217,6 +217,8 @@ int mmc_register_card(struct mmc_card *card)
device_del(&card->dev); device_del(&card->dev);
} }
} }
if (ret == 0)
mmc_card_set_present(card);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment