summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2016-08-31 15:55:59 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-22 16:11:57 +0300
commit3b92fed5e3d6ee7508ca4a3dac10a95a386a3fa5 (patch)
tree8ef19d03990b15c1289e728295a136c3b0ac9997 /drivers/media
parente383ce0736f5ce74bbc0e989c6d044e29fefb9dc (diff)
downloadlinux-3b92fed5e3d6ee7508ca4a3dac10a95a386a3fa5.tar.xz
[media] s5p-jpeg: fix system and runtime PM integration
Use generic helpers instead of open-coding usage of runtime PM for system sleep PM, which was potentially broken for some corner cases. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-core.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index d5e7762b7059..52dc7941db65 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -3003,26 +3003,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
}
#endif /* CONFIG_PM */
-#ifdef CONFIG_PM_SLEEP
-static int s5p_jpeg_suspend(struct device *dev)
-{
- if (pm_runtime_suspended(dev))
- return 0;
-
- return s5p_jpeg_runtime_suspend(dev);
-}
-
-static int s5p_jpeg_resume(struct device *dev)
-{
- if (pm_runtime_suspended(dev))
- return 0;
-
- return s5p_jpeg_runtime_resume(dev);
-}
-#endif
-
static const struct dev_pm_ops s5p_jpeg_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(s5p_jpeg_runtime_suspend, s5p_jpeg_runtime_resume,
NULL)
};