]> git.baikalelectronics.ru Git - kernel.git/commit
spi: sh-msiof: Fix invalid SPI use during system suspend
authorGaku Inami <gaku.inami.xw@bp.renesas.com>
Wed, 5 Sep 2018 08:49:36 +0000 (10:49 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 5 Sep 2018 11:39:46 +0000 (12:39 +0100)
commitd62a72dca6883797b0d410952dc5f1709c67f942
treed8a2c25ad9f9c3911552d4e99450a0287c95208e
parent9f9209f0aa86293ba669c986bf3a2bf69e972fc9
spi: sh-msiof: Fix invalid SPI use during system suspend

If the SPI queue is running during system suspend, the system may lock
up.

Fix this by stopping/restarting the queue during system suspend/resume
by calling spi_master_suspend()/spi_master_resume() from the PM
callbacks.  In-kernel users will receive an -ESHUTDOWN error while
system suspend/resume is in progress.

Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
[geert: Cleanup, reword]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
drivers/spi/spi-sh-msiof.c