提交 b6bf30d9 编写于 作者: J Jean-Christophe PLAGNIOL-VILLARD 提交者: Chris Ball

mmc: of_mmc_spi: fix little endian support

The voltage_ranges is supposed to switch from big endian to little endian.
Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: NGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 2d0d68f5
......@@ -113,8 +113,8 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册