Skip to content

Commit 7435bb7

Browse files
jh80chungcjb
authored andcommitted
mmc: core: use defined R1_STATE_PRG macro for card status
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
1 parent 65be3fe commit 7435bb7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/mmc/card/mmc_test.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static void mmc_test_prepare_mrq(struct mmc_test_card *test,
224224
static int mmc_test_busy(struct mmc_command *cmd)
225225
{
226226
return !(cmd->resp[0] & R1_READY_FOR_DATA) ||
227-
(R1_CURRENT_STATE(cmd->resp[0]) == 7);
227+
(R1_CURRENT_STATE(cmd->resp[0]) == R1_STATE_PRG);
228228
}
229229

230230
/*

‎drivers/mmc/core/core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
15021502
goto out;
15031503
}
15041504
} while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
1505-
R1_CURRENT_STATE(cmd.resp[0]) == 7);
1505+
R1_CURRENT_STATE(cmd.resp[0]) == R1_STATE_PRG);
15061506
out:
15071507
return err;
15081508
}

‎drivers/mmc/core/mmc_ops.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
407407
break;
408408
if (mmc_host_is_spi(card->host))
409409
break;
410-
} while (R1_CURRENT_STATE(status) == 7);
410+
} while (R1_CURRENT_STATE(status) == R1_STATE_PRG);
411411

412412
if (mmc_host_is_spi(card->host)) {
413413
if (status & R1_SPI_ILLEGAL_COMMAND)

0 commit comments

Comments
 (0)