aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-09-22 19:45:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:36 -0400
commite9510176ff728135383f0cdfc9c90cfe57f9e162 (patch)
tree59f5e29d59c98e21c9a1ec26e6dac173adeb71d3 /drivers/mmc/host/sdhci.c
parent006ebd5de13854d6250eecc76866bbfad1ff7daf (diff)
sdhci: be more strict with get_min_clock() usage
get_min_clock() makes sense only with NONSTANDARD_CLOCK quirk and when set_clock() callback is specified. The patch should cause no functional changes, it just makes the code self-documented and avoids any possible misuse of get_min_clock(). Suggested-by: Pierre Ossman <pierre@ossman.eu> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Ian Molton <ian@mnementh.co.uk> Cc: Matt Fleming <matt@console-pimps.org> Cc: Philip Langdale <philipl@overt.org> Cc: Pierre Ossman <pierre@ossman.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index fc96f8cb9c0b..7f7f45b4b07b 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1772,7 +1772,8 @@ int sdhci_add_host(struct sdhci_host *host)
1772 * Set host parameters. 1772 * Set host parameters.
1773 */ 1773 */
1774 mmc->ops = &sdhci_ops; 1774 mmc->ops = &sdhci_ops;
1775 if (host->ops->get_min_clock) 1775 if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK &&
1776 host->ops->set_clock && host->ops->get_min_clock)
1776 mmc->f_min = host->ops->get_min_clock(host); 1777 mmc->f_min = host->ops->get_min_clock(host);
1777 else 1778 else
1778 mmc->f_min = host->max_clk / 256; 1779 mmc->f_min = host->max_clk / 256;