Fix the sysdev approach for power management.

We need to use the container_of() call to access our device private.
main
Alan Hourihane 2005-06-24 09:28:50 +00:00
parent cdc50eba6a
commit fe42d43a63
1 changed files with 4 additions and 2 deletions

View File

@ -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");