Fix the sysdev approach for power management.
We need to use the container_of() call to access our device private.main
parent
cdc50eba6a
commit
fe42d43a63
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue