summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <[email protected]>2017-09-21 16:29:59 +0200
committerJaehoon Chung <[email protected]>2018-01-12 18:11:04 +0900
commit2a4d212f7110712f51ae8af73abbdb0ae2af0814 (patch)
treeb62cf2acd5e7bfb8eeb2e2ffc93d1a2a16cd9a1f /drivers
parent3862b854740d296356a5cfd3146b270ad3501d97 (diff)
mmc: make mmc_set_ios() return status
set_ios callback has a return value of 'int' but the mmc_set_ios() function ignore this. Modify mmc_set_ios() and the callers of mmc_set_ios() to to return the error status. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Jean-Jacques Hiblot <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 822b66b906c..588cfb2b2e3 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1196,14 +1196,18 @@ static inline int bus_width(uint cap)
}
#if !CONFIG_IS_ENABLED(DM_MMC)
-static void mmc_set_ios(struct mmc *mmc)
+static int mmc_set_ios(struct mmc *mmc)
{
+ int ret = 0;
+
if (mmc->cfg->ops->set_ios)
- mmc->cfg->ops->set_ios(mmc);
+ ret = mmc->cfg->ops->set_ios(mmc);
+
+ return ret;
}
#endif
-void mmc_set_clock(struct mmc *mmc, uint clock)
+int mmc_set_clock(struct mmc *mmc, uint clock)
{
if (clock > mmc->cfg->f_max)
clock = mmc->cfg->f_max;
@@ -1213,14 +1217,14 @@ void mmc_set_clock(struct mmc *mmc, uint clock)
mmc->clock = clock;
- mmc_set_ios(mmc);
+ return mmc_set_ios(mmc);
}
-static void mmc_set_bus_width(struct mmc *mmc, uint width)
+static int mmc_set_bus_width(struct mmc *mmc, uint width)
{
mmc->bus_width = width;
- mmc_set_ios(mmc);
+ return mmc_set_ios(mmc);
}
#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG)