]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/sunxi_mmc.c
mmc: change the set_ios return type from void to int
[u-boot] / drivers / mmc / sunxi_mmc.c
index b8716c93cb06df7e04f3d3b3719c50cee65bf8f7..fd3fc2af40a05b1a418981b5c8e8d05017cde3d0 100644 (file)
@@ -227,7 +227,7 @@ static int mmc_config_clock(struct mmc *mmc)
        return 0;
 }
 
-static void sunxi_mmc_set_ios(struct mmc *mmc)
+static int sunxi_mmc_set_ios(struct mmc *mmc)
 {
        struct sunxi_mmc_host *mmchost = mmc->priv;
 
@@ -237,7 +237,7 @@ static void sunxi_mmc_set_ios(struct mmc *mmc)
        /* Change clock first */
        if (mmc->clock && mmc_config_clock(mmc) != 0) {
                mmchost->fatal_err = 1;
-               return;
+               return -EINVAL;
        }
 
        /* Change bus width */
@@ -247,6 +247,8 @@ static void sunxi_mmc_set_ios(struct mmc *mmc)
                writel(0x1, &mmchost->reg->width);
        else
                writel(0x0, &mmchost->reg->width);
+
+       return 0;
 }
 
 static int sunxi_mmc_core_init(struct mmc *mmc)