On Wed, Nov 06, 2013 at 12:28:15PM +0100, Martin Sperl wrote: > >> /* generic wrapper functions for device drivers to use */ > >> static int bcm2835dma_spi_prepare_message(struct spi_device *spi, > > Like I said earlier I'm concerned about the idea of drivers calling > > these functions directly, this should all be factored out of drivers > > since there's nothing really driver specific here. > Actually it is VERY driver specific! > The thing is that you can not easily detect if the same spi_message has > been used and in some way changed without having to walk and compare the > structure to an existing checksum - and such computation would take say > 1/3rd of the time it takes to prepare the message again. I'm sorry but the above makes no sense to me. Why on earth would you need to do these checks?