diff options
author | Grygorii Strashko <grygorii.strashko@linaro.org> | 2015-02-25 13:08:20 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-03-24 08:09:43 -0400 |
commit | 1d601da27b052be84eb49854ddbc7c1046d6702d (patch) | |
tree | 317af6efcc467941ced0e16559e78320a5633225 /drivers/gpu/drm/omapdrm | |
parent | 8450c8d071d858e8f95855a7b5897df3981e3d21 (diff) |
drm/omap: tiler: add hibernation callback
Setting a dev_pm_ops resume callback but not a set of hibernation
handler means that pm function will not be called upon hibernation.
Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the
suspend and hibernation handlers and move omap_dmm_resume under
CONFIG_PM_SLEEP to avoid build warnings.
Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
[tomi valkeinen: add missing 'static']
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index 20db850a1656..042038e8a662 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | |||
@@ -965,7 +965,7 @@ error: | |||
965 | } | 965 | } |
966 | #endif | 966 | #endif |
967 | 967 | ||
968 | #ifdef CONFIG_PM | 968 | #ifdef CONFIG_PM_SLEEP |
969 | static int omap_dmm_resume(struct device *dev) | 969 | static int omap_dmm_resume(struct device *dev) |
970 | { | 970 | { |
971 | struct tcm_area area; | 971 | struct tcm_area area; |
@@ -989,12 +989,10 @@ static int omap_dmm_resume(struct device *dev) | |||
989 | 989 | ||
990 | return 0; | 990 | return 0; |
991 | } | 991 | } |
992 | |||
993 | static const struct dev_pm_ops omap_dmm_pm_ops = { | ||
994 | .resume = omap_dmm_resume, | ||
995 | }; | ||
996 | #endif | 992 | #endif |
997 | 993 | ||
994 | static SIMPLE_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume); | ||
995 | |||
998 | #if defined(CONFIG_OF) | 996 | #if defined(CONFIG_OF) |
999 | static const struct dmm_platform_data dmm_omap4_platform_data = { | 997 | static const struct dmm_platform_data dmm_omap4_platform_data = { |
1000 | .cpu_cache_flags = OMAP_BO_WC, | 998 | .cpu_cache_flags = OMAP_BO_WC, |
@@ -1024,9 +1022,7 @@ struct platform_driver omap_dmm_driver = { | |||
1024 | .owner = THIS_MODULE, | 1022 | .owner = THIS_MODULE, |
1025 | .name = DMM_DRIVER_NAME, | 1023 | .name = DMM_DRIVER_NAME, |
1026 | .of_match_table = of_match_ptr(dmm_of_match), | 1024 | .of_match_table = of_match_ptr(dmm_of_match), |
1027 | #ifdef CONFIG_PM | ||
1028 | .pm = &omap_dmm_pm_ops, | 1025 | .pm = &omap_dmm_pm_ops, |
1029 | #endif | ||
1030 | }, | 1026 | }, |
1031 | }; | 1027 | }; |
1032 | 1028 | ||