drivers: spi: nrfx: Restore recently changed spi_context function
Function spi_context_longest_current_buf() has been introduced in commit ddef35c1 for the purpose of getting the longest possible (potentially partial) SPI transfer for which all currently active directions have a continuous buffer. Such transfer can be done with taking advantage of a DMA that cannot use scattered buffers (and this is the case for nRF SPI drivers with which this function has been introduced). Unfortunately, because of its inadequate name, later on this function has been incorrectly used in other SPI drivers for getting the longer of TX/RX buffers. And commit afc480f1 recently "fixed" the implementation of this function, assumably to adjust it to those incorrect uses, but this way it has also broken the nRF SPI drivers. Instead of restoring the original implementation of the function in question, this commit adds a new one with functionality equivalent to that original but with a hopefully less misleading name, and this function is used in the nRF SPI drivers. Signed-off-by:Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Loading
Please sign in to comment