diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2014-12-05 19:40:59 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-19 09:56:30 +0100 |
commit | 63e415c64003fd62a302a1dc19f082e2c6f1b7cc (patch) | |
tree | 87a6a228a7f2b2fc19c9e3f67b1339181b930f05 /drivers/mmc/core/mmc.c | |
parent | fdb9de129e1d68e1b804bc9c8b3027bea9b88bc8 (diff) | |
download | lwn-63e415c64003fd62a302a1dc19f082e2c6f1b7cc.tar.gz lwn-63e415c64003fd62a302a1dc19f082e2c6f1b7cc.zip |
mmc: core: Simplify by adding mmc_execute_tuning()
For each MMC, SD and SDIO there is code that
holds the clock, calls ops->execute_tuning, and
releases the clock. Simplify the code a bit by
providing a separate function to do that.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/mmc.c')
-rw-r--r-- | drivers/mmc/core/mmc.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index d5d576a4bcbb..1fc48a280659 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1162,7 +1162,6 @@ bus_speed: static int mmc_hs200_tuning(struct mmc_card *card) { struct mmc_host *host = card->host; - int err = 0; /* * Timing should be adjusted to the HS400 target @@ -1173,18 +1172,7 @@ static int mmc_hs200_tuning(struct mmc_card *card) if (host->ops->prepare_hs400_tuning) host->ops->prepare_hs400_tuning(host, &host->ios); - if (host->ops->execute_tuning) { - mmc_host_clk_hold(host); - err = host->ops->execute_tuning(host, - MMC_SEND_TUNING_BLOCK_HS200); - mmc_host_clk_release(host); - - if (err) - pr_err("%s: tuning execution failed\n", - mmc_hostname(host)); - } - - return err; + return mmc_execute_tuning(card); } /* |