summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-core/i915_pm.c4
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 );