From: Jeremie Samuel Date: Mon, 21 Oct 2013 15:25:56 +0000 (+0200) Subject: mmc: sdhci: Get rid of mdelay()s where it is safe and makes sense X-Git-Tag: next-20131024~57^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8c47a116200a0e0f731ce882b9ba83706a6fe5a0;p=karo-tx-linux.git mmc: sdhci: Get rid of mdelay()s where it is safe and makes sense Since we don't run in the atomic context any longer, we can turn mdelay()s into msleep()s. The only place where the driver is still using mdelay() is sdhci_send_command(). There it is possible to use sleepable delays too, but we don't actually want to force rescheduling in a hot path. Sure, we might end up calling msleep() there too, just not via this safe patch. PAtch based on: http://thread.gmane.org/gmane.linux.kernel.mmc/2579. Signed-off-by: Anton Vorontsov Signed-off-by: Jeremie Samuel Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 774a89c4cc6e..0602017ac7c4 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -220,7 +220,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) return; } timeout--; - mdelay(1); + msleep(1); } if (host->ops->platform_reset_exit) @@ -1238,7 +1238,7 @@ clock_set: return; } timeout--; - mdelay(1); + msleep(1); } clk |= SDHCI_CLOCK_CARD_EN; @@ -1317,7 +1317,7 @@ static int sdhci_set_power(struct sdhci_host *host, unsigned short power) * can apply clock after applying power */ if (host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER) - mdelay(10); + msleep(10); return power; } @@ -1980,7 +1980,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); tuning_loop_counter--; timeout--; - mdelay(1); + msleep(1); } while (ctrl & SDHCI_CTRL_EXEC_TUNING); /*