From 1a6780348c9e61833ca240ce6fb80aaa6e75fb92 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 27 Jun 2005 12:39:02 +0000 Subject: Check for 2.6.12 suspend/resume changes (pm_message_t) --- linux-core/drm_pm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'linux-core/drm_pm.c') 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 +#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; } -- cgit v1.2.3