diff options
| author | Surajit Podder <spodder@codeaurora.org> | 2017-02-09 18:13:10 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-09 05:03:58 -0800 |
| commit | a848b0e7784427898337f5c1fa300d4908b48e2c (patch) | |
| tree | e501170446c7037a8bb93060fdbf6e79ea9eeb60 | |
| parent | d24550bbf50f61b07668a28a20878e1f91cf544c (diff) | |
msm: vidc: Return correct error code from venus_hfi_suspend
Return -EBUSY from venus_hfi_suspend if venus power is enabled
after flushing pm workqueue, otherwise return 0, indicating
success.
Change-Id: Ifaee051ad9a1054d9d95fc9fcd3503983f2ef8de
Signed-off-by: Surajit Podder <spodder@codeaurora.org>
| -rw-r--r-- | drivers/media/platform/msm/vidc/venus_hfi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c index 777fb52b2201..6d1ef24c513d 100644 --- a/drivers/media/platform/msm/vidc/venus_hfi.c +++ b/drivers/media/platform/msm/vidc/venus_hfi.c @@ -1301,8 +1301,12 @@ static int venus_hfi_suspend(void *dev) } dprintk(VIDC_DBG, "Suspending Venus\n"); - rc = flush_delayed_work(&venus_hfi_pm_work); + flush_delayed_work(&venus_hfi_pm_work); + mutex_lock(&device->lock); + if (device->power_enabled) + rc = -EBUSY; + mutex_unlock(&device->lock); return rc; } |
