aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-01-09 16:21:56 +1100
committerDave Airlie <airlied@redhat.com>2008-01-09 16:21:56 +1100
commit135f51306b08f9863d77ac85b69989288c62f147 (patch)
tree0b343c7b07ecbb8bb3206479ecb126fe4a5d9490
parentd3da253adbf471c9af9c68b2ff67cbf516856352 (diff)
drm: only call suspend/resume on control node
-rw-r--r--linux-core/drm_sysfs.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c
index a56e9959..114e355e 100644
--- a/linux-core/drm_sysfs.c
+++ b/linux-core/drm_sysfs.c
@@ -36,8 +36,9 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t state)
printk(KERN_ERR "%s\n", __FUNCTION__);
- if (drm_dev->driver->suspend)
- return drm_dev->driver->suspend(drm_dev);
+ if (drm_minor->type == DRM_MINOR_CONTROL)
+ if (drm_dev->driver->suspend)
+ return drm_dev->driver->suspend(drm_dev);
return 0;
}
@@ -54,8 +55,9 @@ static int drm_sysfs_resume(struct device *dev)
struct drm_minor *drm_minor = to_drm_minor(dev);
struct drm_device *drm_dev = drm_minor->dev;
- if (drm_dev->driver->resume)
- return drm_dev->driver->resume(drm_dev);
+ if (drm_minor->type == DRM_MINOR_CONTROL)
+ if (drm_dev->driver->resume)
+ return drm_dev->driver->resume(drm_dev);
return 0;
}
@@ -168,7 +170,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
minor->kdev.release = drm_sysfs_device_release;
minor->kdev.devt = minor->device;
if (minor->type == DRM_MINOR_CONTROL)
- minor_str = "controlD%d";
+ minor_str = "controlD%d";
else
minor_str = "card%d";