]> git.sur5r.net Git - u-boot/blobdiff - drivers/spi/mxc_spi.c
powerpc: MPC8541CDS: Remove macro CONFIG_MPC8541CDS
[u-boot] / drivers / spi / mxc_spi.c
index 23f2ba6223dce6d089ac6af3ac153b19d4e79844..fc2786e270a6cf5f40ce9e965fe0063414532b9a 100644 (file)
@@ -7,7 +7,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <spi.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/arch/imx-regs.h>
@@ -315,7 +315,7 @@ int spi_xchg_single(struct spi_slave *slave, unsigned int bitlen,
                tmp = reg_read(&regs->rxdata);
                data = cpu_to_be32(tmp);
                debug("SPI Rx: 0x%x 0x%x\n", tmp, data);
-               cnt = min(nbytes, sizeof(data));
+               cnt = min_t(u32, nbytes, sizeof(data));
                if (din) {
                        memcpy(din, &data, cnt);
                        din += cnt;