aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmc_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/mmc_write.c')
-rw-r--r--drivers/mmc/mmc_write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
index aa2fdefa75..3db9669c82 100644
--- a/drivers/mmc/mmc_write.c
+++ b/drivers/mmc/mmc_write.c
@@ -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;