Message ID | 1455802378-17780-2-git-send-email-thierry.reding@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index f123f9f4d779..fe001ec4471e 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2301,7 +2301,7 @@ static int __spi_split_transfer_maxsize(struct spi_master *master, /* the first transfer just needs the length modified, so we * run it outside the loop */ - xfers[0].len = min(maxsize, xfer[0].len); + xfers[0].len = min_t(size_t, maxsize, xfer[0].len); /* all the others need rx_buf/tx_buf also set */ for (i = 1, offset = maxsize; i < count; offset += maxsize, i++) {