mmc: core: Drop open coding when preparing commands with busy signaling
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 4 May 2021 16:12:12 +0000 (18:12 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 14 Jun 2021 11:57:35 +0000 (13:57 +0200)
commite62f1e0b2384e25fe61042da3ecf08b7d8262f8d
tree6411894d927f4cc69d959cb7636c06e0c484ecd0
parent94ee6782e045645abd9180ab9369b01293d862bd
mmc: core: Drop open coding when preparing commands with busy signaling

Similar code for validating the host->max_busy_timeout towards the current
command's busy timeout, exists in mmc_do_erase(), mmc_sleep() and
__mmc_switch(). Let's move the common code into a helper function.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20210504161222.101536-2-ulf.hansson@linaro.org
drivers/mmc/core/core.c
drivers/mmc/core/mmc.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/mmc_ops.h