From: Pierre Ossman Date: Sat, 10 Feb 2007 14:52:23 +0000 (+0100) Subject: mmc: Move "present" marking X-Git-Tag: v2.6.22-rc1~1032^2~20 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29041dbe199b0dff392bf1b9d634357da0b3208f;p=linux-2.6 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 --- diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index ccd3037da2..9ffeeb2cba 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 e0e82d849d..06f264b2f7 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; }