diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-08-31 09:55:58 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-22 10:12:28 -0300 |
commit | 57b978ada073106d8fc12614f504cb92366a7ce1 (patch) | |
tree | f4a6633497c7ad102155a10114225cf047239b90 /drivers | |
parent | 3b92fed5e3d6ee7508ca4a3dac10a95a386a3fa5 (diff) | |
download | linux-57b978ada073106d8fc12614f504cb92366a7ce1.tar.gz linux-57b978ada073106d8fc12614f504cb92366a7ce1.tar.bz2 linux-57b978ada073106d8fc12614f504cb92366a7ce1.zip |
[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>
Diffstat (limited to 'drivers')
-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) return 0; } -static int __maybe_unused s5p_cec_suspend(struct device *dev) -{ - if (pm_runtime_suspended(dev)) - return 0; - return s5p_cec_runtime_suspend(dev); -} - -static int __maybe_unused s5p_cec_resume(struct device *dev) -{ - if (pm_runtime_suspended(dev)) - return 0; - return s5p_cec_runtime_resume(dev); -} - static const struct dev_pm_ops s5p_cec_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(s5p_cec_suspend, s5p_cec_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) SET_RUNTIME_PM_OPS(s5p_cec_runtime_suspend, s5p_cec_runtime_resume, NULL) }; |