[media] exynos-gsc: Simplify system PM even more
authorMarek Szyprowski <[email protected]>
Wed, 9 Nov 2016 14:23:58 +0000 (12:23 -0200)
committerMauro Carvalho Chehab <[email protected]>
Wed, 16 Nov 2016 18:34:21 +0000 (16:34 -0200)
System PM callbacks only ensure that device is runtime suspended/resumed,
so remove them and use generic pm_runtime_force_suspend/resume helper.

Signed-off-by: Marek Szyprowski <[email protected]>
Reviewed-by: Ulf Hansson <[email protected]>
Tested-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Sylwester Nawrocki <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/platform/exynos-gsc/gsc-core.c

index 5aeb8b44eacd0299f054098ff9f81fd58f82b51c..45a62216385a731119c57b6ab553d0b15db41c7f 100644 (file)
@@ -1179,26 +1179,9 @@ static int gsc_runtime_suspend(struct device *dev)
 }
 #endif
 
-#ifdef CONFIG_PM_SLEEP
-static int gsc_resume(struct device *dev)
-{
-       if (!pm_runtime_suspended(dev))
-               return gsc_runtime_resume(dev);
-
-       return 0;
-}
-
-static int gsc_suspend(struct device *dev)
-{
-       if (!pm_runtime_suspended(dev))
-               return gsc_runtime_suspend(dev);
-
-       return 0;
-}
-#endif
-
 static const struct dev_pm_ops gsc_pm_ops = {
-       SET_SYSTEM_SLEEP_PM_OPS(gsc_suspend, gsc_resume)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
        SET_RUNTIME_PM_OPS(gsc_runtime_suspend, gsc_runtime_resume, NULL)
 };