Commit 57b978ad authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Mauro Carvalho Chehab

[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: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 3b92fed5
...@@ -250,22 +250,9 @@ static int s5p_cec_runtime_resume(struct device *dev) ...@@ -250,22 +250,9 @@ static int s5p_cec_runtime_resume(struct device *dev)
return 0; 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 = { 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, SET_RUNTIME_PM_OPS(s5p_cec_runtime_suspend, s5p_cec_runtime_resume,
NULL) NULL)
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment