[PATCH 2/2] mmc: dw_mmc: Print proper voltage on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The commit 97f659a2e972 ("mmc: dw_mmc: prevent to set the wrong
value") reordered the code so the 'uhs' variable used in
mmc_regulator_set_vqmmc() error message is always 0 at that time thus
always printing 3.3 voltage.  Instead use value obtained from ios in
printed error message.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
---
 drivers/mmc/host/dw_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c2a128628b31..7de561065003 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1416,8 +1416,8 @@ static int dw_mci_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios)
 	ret = mmc_regulator_set_vqmmc(mmc, ios);
 	if (ret) {
 		dev_err(&mmc->class_dev,
-				 "Regulator set error %d - %s V\n",
-				 ret, uhs & v18 ? "1.8" : "3.3");
+				 "Regulator set error %d - %s\n",
+				 ret, mmc_voltage_to_str(ios));
 		return ret;
 	}
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux