diff options
author | Imre Deak <imre.deak@intel.com> | 2014-09-10 18:16:55 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-10-24 16:34:06 +0200 |
commit | 0b14cbd2f58199a024acbe2994bb27533c97d756 (patch) | |
tree | 1591cf2fddd68ab8f962a6c46d132a7fdce88063 | |
parent | 409ee761fdc3b39e34ffccea375e7f0f13fce9cc (diff) | |
download | op-kernel-dev-0b14cbd2f58199a024acbe2994bb27533c97d756.zip op-kernel-dev-0b14cbd2f58199a024acbe2994bb27533c97d756.tar.gz |
drm/i915: remove dead code from legacy suspend handler
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>
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index a05a1d0..f7bc3e980 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -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; |