summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2005-06-27 12:39:02 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2005-06-27 12:39:02 +0000
commit1a6780348c9e61833ca240ce6fb80aaa6e75fb92 (patch)
treed41a6f318e10562c926224cbf993fe956c35eeba /linux-core
parentfa24ccccf4beeef41d8de23a345408b7b047ae3f (diff)
Check for 2.6.12 suspend/resume changes (pm_message_t)
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;
}