diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-06-27 11:41:40 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-06-27 11:41:40 +0000 |
commit | fa24ccccf4beeef41d8de23a345408b7b047ae3f (patch) | |
tree | 01b69f2c85fad002444f8b7fa1f7267fdaf1aa99 | |
parent | d6af2016635ced096812030547a930433e9382eb (diff) |
Check dev_priv
-rw-r--r-- | shared-core/i915_pm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-core/i915_pm.c b/shared-core/i915_pm.c index c9a288fe..b1a152e0 100644 --- a/shared-core/i915_pm.c +++ b/shared-core/i915_pm.c @@ -121,6 +121,8 @@ int i915_suspend( struct pci_dev *pdev, unsigned state ) DRM_DEBUG("%s state=%d\n", __FUNCTION__, state); + if (!dev_priv) return; + /* Save state for power up later */ if (state != 0) { I915_WRITE( SRX_INDEX, SR01 ); @@ -171,6 +173,8 @@ int i915_power( drm_device_t *dev, unsigned int state ) DRM_DEBUG("%s state=%d\n", __FUNCTION__, state); + if (!dev_priv) return; + /* Save state for power up later */ if (state != 0) { I915_WRITE( SRX_INDEX, SR01 ); |