Commit 43b0b361 authored by Masaharu Hayakawa's avatar Masaharu Hayakawa Committed by Ulf Hansson

mmc: tmio: always get number of taps

Current code gets number of taps only once and keeps the value. This is
not correct, we need to obtain it every time before executing tuning,
so remove the outer if-block.
Signed-off-by: default avatarMasaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
[wsa: extracted from a larger patch and reworded commit message]
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5f07ef8f
...@@ -815,16 +815,14 @@ static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode) ...@@ -815,16 +815,14 @@ static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
struct tmio_mmc_host *host = mmc_priv(mmc); struct tmio_mmc_host *host = mmc_priv(mmc);
int i, ret = 0; int i, ret = 0;
if (!host->tap_num) { if (!host->init_tuning || !host->select_tuning)
if (!host->init_tuning || !host->select_tuning) /* Tuning is not supported */
/* Tuning is not supported */ goto out;
goto out;
host->tap_num = host->init_tuning(host); host->tap_num = host->init_tuning(host);
if (!host->tap_num) if (!host->tap_num)
/* Tuning is not supported */ /* Tuning is not supported */
goto out; goto out;
}
if (host->tap_num * 2 >= sizeof(host->taps) * BITS_PER_BYTE) { if (host->tap_num * 2 >= sizeof(host->taps) * BITS_PER_BYTE) {
dev_warn_once(&host->pdev->dev, dev_warn_once(&host->pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment