X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fspi%2Fmxc_spi.c;h=fc2786e270a6cf5f40ce9e965fe0063414532b9a;hb=4096f350d5218830ffedc56631e4382df478a370;hp=23f2ba6223dce6d089ac6af3ac153b19d4e79844;hpb=6393c43c18a1aadcdcdd8551826eef15f50353d5;p=u-boot diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 23f2ba6223..fc2786e270 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -315,7 +315,7 @@ int spi_xchg_single(struct spi_slave *slave, unsigned int bitlen, tmp = reg_read(®s->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;