spi: Only idle the message pump in the worker kthread
authorMark Brown <broonie@kernel.org>
Wed, 10 Dec 2014 13:46:33 +0000 (13:46 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 11 Dec 2014 12:25:30 +0000 (12:25 +0000)
commitfc9e0f71f2d7ea43fa3ba0bea68586d1462cb5a7
treef32627b66f9bb1f2330f629526f0d5111360be22
parent0461a4149836c792d186027c8c859637a4cfb11a
spi: Only idle the message pump in the worker kthread

In order to avoid the situation where the kthread is waiting for another
context to make the hardware idle let the message pump know if it's being
called from the worker thread context and if it isn't then defer to the
worker thread instead of idling the hardware immediately. This will ensure
that if this situation happens we block rather than busy waiting.

Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c