X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=drivers%2Fmmc%2Fmmc.c;h=0c2fe351ba1d16d3543340538bdb09e201c98fc9;hp=85e9509ed19374115421bcc6fc5ba10c380f0a24;hb=a9cce7ec02702895ada388ec53ef4b30a40f4bb8;hpb=c2c5b94f8959cd9e05be9e187dc597c6b6e2e786 diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 85e9509ed1..0c2fe351ba 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -20,6 +20,7 @@ static struct list_head mmc_devices; static int cur_dev_num = -1; +static int mmc_dev_count; __weak int board_mmc_getwp(struct mmc *mmc) { @@ -1549,6 +1550,7 @@ struct mmc *mmc_create(const struct mmc_config *cfg, void *priv) INIT_LIST_HEAD(&mmc->link); list_add_tail(&mmc->link, &mmc_devices); + mmc_dev_count++; return mmc; } @@ -1721,6 +1723,11 @@ int get_mmc_num(void) return cur_dev_num; } +int get_mmc_dev_count(void) +{ + return mmc_dev_count; +} + void mmc_set_preinit(struct mmc *mmc, int preinit) { mmc->preinit = preinit;