Message ID | 1478701441-29107-10-git-send-email-m.szyprowski@samsung.com |
---|---|
State | New |
Headers | show |
On 9 November 2016 at 15:23, Marek Szyprowski <m.szyprowski@samsung.com> wrote: > System pm callbacks only ensures that device is runtime suspended/resumed, > so remove them and use generic pm_runtime_force_suspend/resume helper. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Kind regards Uffe > --- > drivers/media/platform/exynos-gsc/gsc-core.c | 21 ++------------------- > 1 file changed, 2 insertions(+), 19 deletions(-) > > diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c > index 4859727..1e8b216 100644 > --- a/drivers/media/platform/exynos-gsc/gsc-core.c > +++ b/drivers/media/platform/exynos-gsc/gsc-core.c > @@ -1166,26 +1166,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) > }; > > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 4859727..1e8b216 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1166,26 +1166,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) };
System pm callbacks only ensures that device is runtime suspended/resumed, so remove them and use generic pm_runtime_force_suspend/resume helper. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/media/platform/exynos-gsc/gsc-core.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html