mmc: Split mmc struct, rework mmc initialization (v2)
[platform/kernel/u-boot.git] / drivers / mmc / mmc_write.c
index aa2fdef..3db9669 100644 (file)
@@ -167,7 +167,8 @@ ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t blkcnt, const void *src)
                return 0;
 
        do {
-               cur = (blocks_todo > mmc->b_max) ?  mmc->b_max : blocks_todo;
+               cur = (blocks_todo > mmc->cfg->b_max) ?
+                       mmc->cfg->b_max : blocks_todo;
                if (mmc_write_blocks(mmc, start, cur, src) != cur)
                        return 0;
                blocks_todo -= cur;