aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2007-02-10 15:52:23 +0100
committerPierre Ossman <drzeus@drzeus.cx>2007-05-01 13:04:16 +0200
commit29041dbe199b0dff392bf1b9d634357da0b3208f (patch)
tree57ad87d6e9577f9558a68dca55592d2368b2f545 /drivers/mmc
parentf74d132cec60b686bce1f284822c1a496700bd3c (diff)
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: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-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;
}