mmc: core: Re-factor some code for SDIO re-initialization
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 11 May 2015 14:46:47 +0000 (16:46 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 8 May 2018 07:32:36 +0000 (09:32 +0200)
commitfb09f44e290b1775fbeadb4289dbcfc2f954b0d2
tree9ed93d6a44a599ae3f3817ecc5723fd45590adab
parent5581cfcdccf139466c3a5f2ad5f58a09a1cd76f3
mmc: core: Re-factor some code for SDIO re-initialization

The mmc_sdio_init_card() function has a couple of callers. In the
re-initialization cases, some additional reset commands are issued before
mmc_sdio_init_card() is called. As these additional reset commands are the
same, let's move these into a new static function, mmc_sdio_reinit_card()
and call mmc_sdio_init_card() from there. In this way we avoid the open
coding.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Quentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
drivers/mmc/core/sdio.c