diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-08-31 08:55:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-22 09:12:28 -0400 |
commit | 57b978ada073106d8fc12614f504cb92366a7ce1 (patch) | |
tree | f4a6633497c7ad102155a10114225cf047239b90 | |
parent | 3b92fed5e3d6ee7508ca4a3dac10a95a386a3fa5 (diff) |
[media] s5p-cec: 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/staging/media/s5p-cec/s5p_cec.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c index 78333273c4e5..77d9887801b8 100644 --- a/drivers/staging/media/s5p-cec/s5p_cec.c +++ b/drivers/staging/media/s5p-cec/s5p_cec.c | |||
@@ -250,22 +250,9 @@ static int s5p_cec_runtime_resume(struct device *dev) | |||
250 | return 0; | 250 | return 0; |
251 | } | 251 | } |
252 | 252 | ||
253 | static int __maybe_unused s5p_cec_suspend(struct device *dev) | ||
254 | { | ||
255 | if (pm_runtime_suspended(dev)) | ||
256 | return 0; | ||
257 | return s5p_cec_runtime_suspend(dev); | ||
258 | } | ||
259 | |||
260 | static int __maybe_unused s5p_cec_resume(struct device *dev) | ||
261 | { | ||
262 | if (pm_runtime_suspended(dev)) | ||
263 | return 0; | ||
264 | return s5p_cec_runtime_resume(dev); | ||
265 | } | ||
266 | |||
267 | static const struct dev_pm_ops s5p_cec_pm_ops = { | 253 | static const struct dev_pm_ops s5p_cec_pm_ops = { |
268 | SET_SYSTEM_SLEEP_PM_OPS(s5p_cec_suspend, s5p_cec_resume) | 254 | SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, |
255 | pm_runtime_force_resume) | ||
269 | SET_RUNTIME_PM_OPS(s5p_cec_runtime_suspend, s5p_cec_runtime_resume, | 256 | SET_RUNTIME_PM_OPS(s5p_cec_runtime_suspend, s5p_cec_runtime_resume, |
270 | NULL) | 257 | NULL) |
271 | }; | 258 | }; |