X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fspi%2Fmxc_spi.c;h=08815994fe5d21d0effd00394cea05ce6698508c;hb=5e4e87418e0f0e62854fe6c38736e2ee771ec3a7;hp=23f2ba6223dce6d089ac6af3ac153b19d4e79844;hpb=ccc39d66c3c8381690fcfffb794768c55c909460;p=oweals%2Fu-boot.git diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 23f2ba6223..08815994fe 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -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;