From fe42d43a63d95243fa911f88bb01c383d5e6716e Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Fri, 24 Jun 2005 09:28:50 +0000 Subject: Fix the sysdev approach for power management. We need to use the container_of() call to access our device private. --- linux-core/drm_pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux-core') 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"); -- cgit v1.2.3