diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-08-31 08:55:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-22 09:11:57 -0400 |
commit | 3b92fed5e3d6ee7508ca4a3dac10a95a386a3fa5 (patch) | |
tree | 8ef19d03990b15c1289e728295a136c3b0ac9997 | |
parent | e383ce0736f5ce74bbc0e989c6d044e29fefb9dc (diff) |
[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>
-rw-r--r-- | drivers/media/platform/s5p-jpeg/jpeg-core.c | 21 |
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) | |||
3003 | } | 3003 | } |
3004 | #endif /* CONFIG_PM */ | 3004 | #endif /* CONFIG_PM */ |
3005 | 3005 | ||
3006 | #ifdef CONFIG_PM_SLEEP | ||
3007 | static int s5p_jpeg_suspend(struct device *dev) | ||
3008 | { | ||
3009 | if (pm_runtime_suspended(dev)) | ||
3010 | return 0; | ||
3011 | |||
3012 | return s5p_jpeg_runtime_suspend(dev); | ||
3013 | } | ||
3014 | |||
3015 | static int s5p_jpeg_resume(struct device *dev) | ||
3016 | { | ||
3017 | if (pm_runtime_suspended(dev)) | ||
3018 | return 0; | ||
3019 | |||
3020 | return s5p_jpeg_runtime_resume(dev); | ||
3021 | } | ||
3022 | #endif | ||
3023 | |||
3024 | static const struct dev_pm_ops s5p_jpeg_pm_ops = { | 3006 | static const struct dev_pm_ops s5p_jpeg_pm_ops = { |
3025 | SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume) | 3007 | SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, |
3008 | pm_runtime_force_resume) | ||
3026 | SET_RUNTIME_PM_OPS(s5p_jpeg_runtime_suspend, s5p_jpeg_runtime_resume, | 3009 | SET_RUNTIME_PM_OPS(s5p_jpeg_runtime_suspend, s5p_jpeg_runtime_resume, |
3027 | NULL) | 3010 | NULL) |
3028 | }; | 3011 | }; |