Commit 503ca5e8a3e6daea178f5aa17a8ba90c650dd206
Committed by
Lokesh Vutla
1 parent
331f3e243e
Exists in
v2017.01-smarct4x
and in
2 other branches
drivers: mmc: Fix compilation when CONFIG_BLK is enabled.
commit 8dc8d294b "drivers: mmc: downgrade the current mode if error rate becomes too high" breaks the compilation of mmc core when CONFIG_BLK is enabled. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Showing 2 changed files with 8 additions and 0 deletions Side-by-side Diff
drivers/mmc/mmc.c
... | ... | @@ -446,7 +446,11 @@ |
446 | 446 | if (mmc_check_error_rate(mmc, &mmc->rd_stats)) |
447 | 447 | if (mmc_disable_current_mode(mmc)) |
448 | 448 | return (blkcnt - blocks_todo) + |
449 | +#ifdef CONFIG_BLK | |
450 | + mmc_bread(dev, start, | |
451 | +#else | |
449 | 452 | mmc_bread(block_dev, start, |
453 | +#endif | |
450 | 454 | blocks_todo, dst); |
451 | 455 | debug("%s: Failed to read blocks\n", __func__); |
452 | 456 | return 0; |
drivers/mmc/mmc_write.c
... | ... | @@ -225,7 +225,11 @@ |
225 | 225 | if (mmc_check_error_rate(mmc, &mmc->wr_stats)) |
226 | 226 | if (mmc_disable_current_mode(mmc)) |
227 | 227 | return (blkcnt - blocks_todo) + |
228 | +#ifdef CONFIG_BLK | |
229 | + mmc_bwrite(dev, start, | |
230 | +#else | |
228 | 231 | mmc_bwrite(block_dev, start, |
232 | +#endif | |
229 | 233 | blocks_todo, src); |
230 | 234 | debug("%s: Failed to write blocks\n", __func__); |
231 | 235 | return 0; |