]> git.baikalelectronics.ru Git - kernel.git/commit
spi: pxa2xx: Adapt reset_sccr1() to the case when no message available
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 21 Jul 2021 12:15:20 +0000 (15:15 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 22 Jul 2021 11:41:19 +0000 (12:41 +0100)
commit8d3d87470e7aec1a333b50b8e8b265dc3ca3bd83
treee4d1d4dd925f38433ebc66ad01bbdb4e5cd0fc25
parentf0611f68447659d6dcf695603ceb3bac85612f4f
spi: pxa2xx: Adapt reset_sccr1() to the case when no message available

In some cases reset_sccr1() can be called when no message available.
This means that there is no associated chip to receive that message
and hence no threshold needs to be set. Adapt the function to such
cases.

Fixes: c37fc1b26a87 ("spi: pxa2xx: Reuse int_stop_and_reset() in couple of places")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210721121520.62605-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c