• Mark Brown's avatar
    spi: Factor validation and initialisation of messages outside lock · 90808738
    Mark Brown authored
    Currently we do a bunch of per-message validation and initialisation in
    __spi_async() which is called with the bus lock held. Since none of this
    validation depends on the current bus status there's no need to hold the
    lock to do it so split it out into a separate __spi_validate() function
    which is called prior to taking the bus lock.
    
    This could be slightly neater but keep things simple for now to show the
    code motion clearly.
    
    Based on observations from Martin Sperl.
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    90808738
spi.c 55.3 KB