]> err.no Git - linux-2.6/commitdiff
mmc: Move "present" marking
authorPierre Ossman <drzeus@drzeus.cx>
Sat, 10 Feb 2007 14:52:23 +0000 (15:52 +0100)
committerPierre Ossman <drzeus@drzeus.cx>
Tue, 1 May 2007 11:04:16 +0000 (13:04 +0200)
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>
drivers/mmc/mmc.c
drivers/mmc/mmc_sysfs.c

index ccd3037da249c3e29d690eb88b4b289a9f12fb62..9ffeeb2cba45dc216529d20cbb1e23680f2ca936 100644 (file)
@@ -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);
                }
 
                /*
index e0e82d849d5f06bab805179033b89ee36f2351c7..06f264b2f79ce560dc55baaa08930e41db02f673 100644 (file)
@@ -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;
 }