mmc: core: Optimize the mmc erase size alignment
authorBaolin Wang <baolin.wang@linaro.org>
Wed, 7 Sep 2016 02:38:25 +0000 (10:38 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Sep 2016 19:31:26 +0000 (21:31 +0200)
commit6c689886fbe41b6492bd8ee9334ff66893274810
treeaf389ed1f152b5fcb09f3f54ca74743de3aa8c9f
parent71085123d27dc5d28ce523344f32ac0d20c5f0a5
mmc: core: Optimize the mmc erase size alignment

In most cases the 'card->erase_size' is power of 2, then the round_up/down()
function is more efficient than '%' operation when the 'card->erase_size' is
power of 2.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Tested-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c