Re: [PATCH v2 1/4] mmc: core: use mmc_send_status to check hw_reset

Ulf Hansson
2014-11-05T09:44:43Z

On 4 November 2014 16:07, Johan Rudholm <johan.rudholm@axis.com> wrote:
> Signed-off-by: Johan Rudholm <johanru@axis.com>

Thanks! Applied for next.

Kind regards
Uffe

> ---
> drivers/mmc/core/core.c | 10 ++--------
> 1 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 7dc0c85..5d215ee 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2265,15 +2265,9 @@ static int mmc_do_hw_reset(struct mmc_host *host, int check)
>
> /* If the reset has happened, then a status command will fail */
> if (check) {
> - struct mmc_command cmd = {0};
> - int err;
> + u32 status;
>
> - cmd.opcode = MMC_SEND_STATUS;
> - if (!mmc_host_is_spi(card->host))
> - cmd.arg = card->rca << 16;
> - cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC;
> - err = mmc_wait_for_cmd(card->host, &cmd, 0);
> - if (!err) {
> + if (!mmc_send_status(card, &status)) {
> mmc_host_clk_release(host);
> return -ENOSYS;
> }
> --
> 1.7.2.5
>