提交 462849aa 编写于 作者: M Mark Brown

mmc: sdhci: Indicate that regulators may be absent

Use regulator_get_optional() to tell the core that requests for regulators
can fail in a real system.
Signed-off-by: NMark Brown <broonie@linaro.org>
Acked-by: NChris Ball <cjb@laptop.org>
上级 bc35d5ed
...@@ -2966,7 +2966,7 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -2966,7 +2966,7 @@ int sdhci_add_host(struct sdhci_host *host)
mmc->caps |= MMC_CAP_NEEDS_POLL; mmc->caps |= MMC_CAP_NEEDS_POLL;
/* If vqmmc regulator and no 1.8V signalling, then there's no UHS */ /* If vqmmc regulator and no 1.8V signalling, then there's no UHS */
host->vqmmc = regulator_get(mmc_dev(mmc), "vqmmc"); host->vqmmc = regulator_get_optional(mmc_dev(mmc), "vqmmc");
if (IS_ERR_OR_NULL(host->vqmmc)) { if (IS_ERR_OR_NULL(host->vqmmc)) {
if (PTR_ERR(host->vqmmc) < 0) { if (PTR_ERR(host->vqmmc) < 0) {
pr_info("%s: no vqmmc regulator found\n", pr_info("%s: no vqmmc regulator found\n",
...@@ -3042,7 +3042,7 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -3042,7 +3042,7 @@ int sdhci_add_host(struct sdhci_host *host)
ocr_avail = 0; ocr_avail = 0;
host->vmmc = regulator_get(mmc_dev(mmc), "vmmc"); host->vmmc = regulator_get_optional(mmc_dev(mmc), "vmmc");
if (IS_ERR_OR_NULL(host->vmmc)) { if (IS_ERR_OR_NULL(host->vmmc)) {
if (PTR_ERR(host->vmmc) < 0) { if (PTR_ERR(host->vmmc) < 0) {
pr_info("%s: no vmmc regulator found\n", pr_info("%s: no vmmc regulator found\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册