]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/cmd_mmc.c
cmd_mmc: Use init_mmc_device() from do_mmc_rescan()
[karo-tx-uboot.git] / common / cmd_mmc.c
index 6741ebee3bca1b42344e37398ef74d991ba02131..6c8db2e78c4f5ebc18a9dee6d0744d5904e513d6 100644 (file)
@@ -371,16 +371,10 @@ static int do_mmc_rescan(cmd_tbl_t *cmdtp, int flag,
 {
        struct mmc *mmc;
 
-       mmc = find_mmc_device(curr_device);
-       if (!mmc) {
-               printf("no mmc device at slot %x\n", curr_device);
+       mmc = init_mmc_device(curr_device, true);
+       if (!mmc)
                return CMD_RET_FAILURE;
-       }
-
-       mmc->has_init = 0;
 
-       if (mmc_init(mmc))
-               return CMD_RET_FAILURE;
        return CMD_RET_SUCCESS;
 }
 static int do_mmc_part(cmd_tbl_t *cmdtp, int flag,