summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/arm_pl180_mmci.c10
-rw-r--r--drivers/mmc/arm_pl180_mmci.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index ddf8383f1c..7898b0dd70 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -348,9 +348,8 @@ static const struct mmc_ops arm_pl180_mmci_ops = {
* Set initial clock and power for mmc slot.
* Initialize mmc struct and register with mmc framework.
*/
-int arm_pl180_mmci_init(struct pl180_mmc_host *host)
+int arm_pl180_mmci_init(struct pl180_mmc_host *host, struct mmc **mmc)
{
- struct mmc *mmc;
u32 sdi_u32;
writel(host->pwr_init, &host->base->power);
@@ -373,11 +372,12 @@ int arm_pl180_mmci_init(struct pl180_mmc_host *host)
else
host->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
- mmc = mmc_create(&host->cfg, host);
- if (mmc == NULL)
+ *mmc = mmc_create(&host->cfg, host);
+ if (!*mmc)
return -1;
- debug("registered mmc interface number is:%d\n", mmc->block_dev.devnum);
+ debug("registered mmc interface number is:%d\n",
+ (*mmc)->block_dev.devnum);
return 0;
}
diff --git a/drivers/mmc/arm_pl180_mmci.h b/drivers/mmc/arm_pl180_mmci.h
index f23bd391ee..6e232f7df2 100644
--- a/drivers/mmc/arm_pl180_mmci.h
+++ b/drivers/mmc/arm_pl180_mmci.h
@@ -190,6 +190,6 @@ struct pl180_mmc_host {
struct mmc_config cfg;
};
-int arm_pl180_mmci_init(struct pl180_mmc_host *);
+int arm_pl180_mmci_init(struct pl180_mmc_host *host, struct mmc **mmc);
#endif