Thread (3 messages) 3 messages, 2 authors, 2012-01-30
STALE5265d

[PATCH 1/1] of_mmc_spi: fix little endian support

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2012-01-30 04:15:29
Also in: linux-mmc
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, the rest · Maintainers: Ulf Hansson, Linus Torvalds

the voltage_ranges is supposed to switch from big endian to little endian

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: Grant Likely <redacted>
Cc: linux-mmc at vger.kernel.org
---
 drivers/mmc/host/of_mmc_spi.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c
index ab66f24..ede2c64 100644
--- a/drivers/mmc/host/of_mmc_spi.c
+++ b/drivers/mmc/host/of_mmc_spi.c
@@ -109,12 +109,13 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
 		goto err_ocr;
 	}
 
+
 	for (i = 0; i < num_ranges; i++) {
 		const int j = i * 2;
 		u32 mask;
 
-		mask = mmc_vddrange_to_ocrmask(voltage_ranges[j],
-					       voltage_ranges[j + 1]);
+		mask = mmc_vddrange_to_ocrmask(be32_to_cpu(voltage_ranges[j]),
+					       be32_to_cpu(voltage_ranges[j + 1]));
 		if (!mask) {
 			ret = -EINVAL;
 			dev_err(dev, "OF: voltage-range #%d is invalid\n", i);
-- 
1.7.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help