mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]> Cc: Ian Molton <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Philip Langdale <[email protected]> Cc: Pierre Ossman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
006ebd5de1
commit
e9510176ff
1 changed files with 2 additions and 1 deletions
|
|
@ -1772,7 +1772,8 @@ int sdhci_add_host(struct sdhci_host *host)
|
|||
* Set host parameters.
|
||||
*/
|
||||
mmc->ops = &sdhci_ops;
|
||||
if (host->ops->get_min_clock)
|
||||
if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK &&
|
||||
host->ops->set_clock && host->ops->get_min_clock)
|
||||
mmc->f_min = host->ops->get_min_clock(host);
|
||||
else
|
||||
mmc->f_min = host->max_clk / 256;
|
||||
|
|
|
|||
Loading…
Reference in a new issue