spi: Remove SPI_BUFSIZ restriction on spi_write_then_read()
In order to avoid constantly allocating and deallocating there is a fixed buffer which spi_write_then_read() uses for transfers, with an early error check to ensure that the transfer fits within the buffer. This limits the size of transfers to this size, currently max(32, SMP_CACHE_BYTES). Since we can dynamically allocate and in fact already have a fallback to do so when there is contention for the fixed buffer remove this restriction and instead dynamically allocate a suitably sized buffer if the transfer won't fit. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
Showing
想要评论请 注册 或 登录