]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: remove dead code from legacy suspend handler
authorImre Deak <imre.deak@intel.com>
Wed, 10 Sep 2014 15:16:55 +0000 (18:16 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 24 Oct 2014 14:34:06 +0000 (16:34 +0200)
The legacy DRM suspend logic (effective in UMS) doesn't handle any S4 thaw
events so we don't need to care about it either. Only S3 suspend and S4
freeze events are handled. Leave an assert behind to be sure.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c

index a05a1d083e95742842365b31c6bf4946c4846ef9..f7bc3e980d8eb7f0dbb320b7b1c83e72e429728b 100644 (file)
@@ -640,9 +640,9 @@ int i915_suspend(struct drm_device *dev, pm_message_t state)
                return -ENODEV;
        }
 
-       if (state.event == PM_EVENT_PRETHAW)
-               return 0;
-
+       if (WARN_ON_ONCE(state.event != PM_EVENT_SUSPEND &&
+                        state.event != PM_EVENT_FREEZE))
+               return -EINVAL;
 
        if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
                return 0;