of_mmc_spi: fix little endian support
PATCH 1/1 of_mmc_spi: fix little endian support
the voltage_ranges is supposed to switch from big endian to little endian
--- drivers/mmc/host/of_mmc_spi.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/mmc/host/of_mmc_spi.c +3 -2
@@ -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);
Signature · 1 line
1.7.7
Grant Likely
AppliedPATCH 1/1 of_mmc_spi: fix little endian support
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
the
voltage_rangesis supposed to switch from big endian to little endianSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Grant Likely <[email protected]>Cc linux-mmc at vger.kernel.org
Applied, thanks.
g.
Quoted 27 lines
--- drivers/mmc/host/of_mmc_spi.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/mmc/host/of_mmc_spi.c +3
-2@@ -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);Signature · 1 line
1.7.7
PATCH 1/1 of_mmc_spi: fix little endian support
Quoted 8 lines · Grant Likely
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
the
voltage_rangesis supposed to switch from big endian to little endianSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Grant Likely <[email protected]>Cc linux-mmc at vger.kernel.orgApplied, thanks.
Actually, this one should go via Chris' tree since it is part of drivers/mmc. So I've dropped it from my tree and change that s-o-b of mine to an a-b.
g.
PATCH 1/1 of_mmc_spi: fix little endian support
Hi,
Quoted 9 lines · Grant Likely
Quoted 8 lines · Grant Likely
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
the
voltage_rangesis supposed to switch from big endian to little endianSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>Cc Grant Likely <[email protected]>Cc linux-mmc at vger.kernel.org
Quoted 5 lines
Quoted 1 line
Applied, thanks.
Actually, this one should go via Chris' tree since it is part of
drivers/mmc. So I've dropped it from my tree and change that s-o-b of mine to an a-b.
Thanks, done that, and removed the extra/incorrect punctuation change from the patch.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child