Skip to content

Commit

Permalink
mmc: of_mmc_spi: fix little endian support
Browse files Browse the repository at this point in the history
The voltage_ranges is supposed to switch from big endian to little endian.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Chris Ball committed Feb 14, 2012
1 parent 2d0d68f commit b6bf30d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/of_mmc_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b6bf30d

Please sign in to comment.