summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_pm.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/linux-core/drm_pm.c b/linux-core/drm_pm.c
index 1e93e1da..844266ac 100644
--- a/linux-core/drm_pm.c
+++ b/linux-core/drm_pm.c
@@ -36,15 +36,24 @@
#include <linux/sysdev.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11)
static int drm_suspend(struct sys_device *sysdev, u32 state)
+#else
+static int drm_suspend(struct sys_device *sysdev, pm_message_t state)
+#endif
{
struct drm_device *dev =
container_of(sysdev, struct drm_device, sysdev);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
+ int event = state.event;
+#else
+ int event = state;
+#endif
- DRM_DEBUG("state=%d\n", state);
+ DRM_DEBUG("event=%d\n", event);
if (dev->driver->power)
- return dev->driver->power(dev, state);
+ return dev->driver->power(dev, event);
else
return 0;
}