diff options
| author | Chuanxiao.Dong <chuanxiao.dong@intel.com> | 2014-08-01 02:00:13 -0400 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-09-09 07:59:00 -0400 |
| commit | ae9060377a67a0840f980bc0e2cb32af07baf479 (patch) | |
| tree | 681cc827daadff404aca6a4d11a28354a94311d7 | |
| parent | bb2f45927f8e0d1fc0633f65cc1f17a40c80bf24 (diff) | |
mmc: sdhci: fix the wrong type of curr
curr should use signed type since it will contain the returned
value which is possible to be a negative value. Using u32 will
make the returned value to be true even there is a negative result.
Change to use int instead of u32
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 37b2a9ae52ef..d25deff305a5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
| @@ -3049,7 +3049,7 @@ int sdhci_add_host(struct sdhci_host *host) | |||
| 3049 | */ | 3049 | */ |
| 3050 | max_current_caps = sdhci_readl(host, SDHCI_MAX_CURRENT); | 3050 | max_current_caps = sdhci_readl(host, SDHCI_MAX_CURRENT); |
| 3051 | if (!max_current_caps && !IS_ERR(mmc->supply.vmmc)) { | 3051 | if (!max_current_caps && !IS_ERR(mmc->supply.vmmc)) { |
| 3052 | u32 curr = regulator_get_current_limit(mmc->supply.vmmc); | 3052 | int curr = regulator_get_current_limit(mmc->supply.vmmc); |
| 3053 | if (curr > 0) { | 3053 | if (curr > 0) { |
| 3054 | 3054 | ||
| 3055 | /* convert to SDHCI_MAX_CURRENT format */ | 3055 | /* convert to SDHCI_MAX_CURRENT format */ |
