Skip to content

Commit

Permalink
[media] s5p-fimc: Fix fimc-lite system wide suspend procedure
Browse files Browse the repository at this point in the history
Only suspend the video pipeline devices if they were active before
the pm.suspend() helper is called. This patch prevents following error:

/# echo mem > /sys/power/state
[   34.965000] PM: Syncing filesystems ... done.
[   35.035000] Freezing user space processes ... (elapsed 0.01 seconds) done.
...
[   35.105000] dpm_run_callback(): platform_pm_suspend+0x0/0x5c returns -22
[   35.105000] PM: Device exynos-fimc-lite.1 failed to suspend: error -22
[   35.105000] PM: Some devices failed to suspend

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Jun 25, 2012
1 parent e3fc82e commit 316efab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/s5p-fimc/fimc-lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ static int fimc_lite_suspend(struct device *dev)
return 0;

ret = fimc_lite_stop_capture(fimc, suspend);
if (ret)
if (ret < 0 || !fimc_lite_active(fimc))
return ret;

return fimc_pipeline_shutdown(&fimc->pipeline);
Expand Down

0 comments on commit 316efab

Please sign in to comment.