summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2005-06-24 09:28:50 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2005-06-24 09:28:50 +0000
commitfe42d43a63d95243fa911f88bb01c383d5e6716e (patch)
tree05650b2b604da42958e55c1692d672156fce05f6 /linux-core
parentcdc50eba6ac666447a93471fb2db25959f9c2775 (diff)
Fix the sysdev approach for power management.
We need to use the container_of() call to access our device private.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_pm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux-core/drm_pm.c b/linux-core/drm_pm.c
index 68c9d0a9..8e11a16c 100644
--- a/linux-core/drm_pm.c
+++ b/linux-core/drm_pm.c
@@ -38,7 +38,8 @@
static int drm_suspend(struct sys_device *sysdev, u32 state)
{
- drm_device_t *dev = (drm_device_t *)sysdev;
+ struct drm_device *dev =
+ container_of(sysdev, struct drm_device, sysdev);
DRM_DEBUG("state=%d\n", state);
@@ -50,7 +51,8 @@ static int drm_suspend(struct sys_device *sysdev, u32 state)
static int drm_resume(struct sys_device *sysdev)
{
- drm_device_t *dev = (drm_device_t *)sysdev;
+ struct drm_device *dev =
+ container_of(sysdev, struct drm_device, sysdev);
DRM_DEBUG("\n");