• Axel Lin's avatar
    spi: pic32-sqi: Remove pic32_sqi_setup and pic32_sqi_cleanup · 191ec113
    Axel Lin authored
    Current code does not use ctldata at all, so remove spi_set_ctldata call.
    
    spi_setup() will set spi->bits_per_word = 8 if it was not set, so remove
    !spi->max_speed_hz checking.
    
    The spi core allows absent of spi->max_speed_hz setting, if it was not set
    spi_setup() assigns spi->master->max_speed_hz to it.
    
    spi core allows spi->max_speed_hz > spi->master->max_speed_hz, in this case
    spi core will limit the transfer speed to ensure xfer->speed_hz won't
    greater than spi->master->max_speed_hz so remove checking if
    spi->max_speed_hz is higher than spi->master->max_speed_hz.
    
    As a result, both pic32_sqi_setup() and pic32_sqi_cleanup() can be removed.
    Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    191ec113
spi-pic32-sqi.c 18.6 KB