[COMMON] spi: s3c64xx: call runtime pm callback directly in suspend / resume function
authorYoungmin Nam <youngmin.nam@samsung.com>
Tue, 15 Nov 2016 01:31:44 +0000 (10:31 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Wed, 9 May 2018 12:14:45 +0000 (21:14 +0900)
commit4f1450de5da03cfaa12417376d9e22336800a29e
treefce6a46d6f404ce4ddc15b7c136bc1608abf474f
parenta9f870acdcef799db8e08207450a0ae7b2e85dd1
[COMMON] spi: s3c64xx: call runtime pm callback directly in suspend / resume function

If there is transfer request in system suspend stage, the runtime suspend callback
will not be called after transfer completion because the runtime suspend callback of
pm_runtime_put_autosuspend() is queued into workqueue as freezable.
After that, without calling runtime suspend callback before system suspend, it can cause
lock up by central sequencer stuck because clock request is high.
To fix this issue, runtime pm callback should be called directly in suspend / resume
function if runtime pm status is not "suspended".

Change-Id: Iac05b22e50f29bf24fc04eb06719105e65e48ec3
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/spi/spi-s3c64xx.c