• R
    spi: check tx_buf and rx_buf in spi_unmap_msg · f8bb820d
    Robin Gong 提交于
    Some spi device drivers use the same tx_buf and rx_buf repeatly for better
    performance such as driver/input/touchsreen/ads7846.c, but spi core grab tx_buf
    /rx_buf of transfer and set them as dummy_tx/dummy_rx once they are NULL. Thus,
    in the second time the tx_buf/rx_buf will be replaced by dummy_tx/dummy_rx and
    the data which produced by the last tx or rx may be wrongly sent to the device
    or handled by the upper level protocol. This patch just keep the orignal value
    of tx_buf/rx_buf if they are NULL after this transfer processed.
    Signed-off-by: NRobin Gong <b38343@freescale.com>
    Signed-off-by: NMark Brown <broonie@kernel.org>
    f8bb820d
spi.c 62.9 KB