diff mbox

[U-Boot] mmc_spi: fix big-endian support error on be_to_cpu16

Message ID 1440986702-10557-1-git-send-email-thomas@wytron.com.tw
State Accepted
Delegated to: Pantelis Antoniou
Headers show

Commit Message

Thomas Chou Aug. 31, 2015, 2:05 a.m. UTC
u-boot/drivers/mmc/mmc_spi.c:94: undefined reference to
`be_to_cpu16'

It should be cpu_to_be16.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
---
 drivers/mmc/mmc_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index 9032a73..37721ae 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -91,7 +91,7 @@  static uint mmc_spi_readdata(struct mmc *mmc, void *xbuf,
 			spi_xfer(spi, bsize * 8, NULL, buf, 0);
 			spi_xfer(spi, 2 * 8, NULL, &crc, 0);
 #ifdef CONFIG_MMC_SPI_CRC_ON
-			if (be_to_cpu16(cyg_crc16(buf, bsize)) != crc) {
+			if (cpu_to_be16(cyg_crc16(buf, bsize)) != crc) {
 				debug("%s: CRC error\n", mmc->cfg->name);
 				r1 = R1_SPI_COM_CRC;
 				break;