summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-02-05 10:12:21 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-02-05 10:12:21 +0000
commit53937a189f8dbe2dd82fb97c0e88454d29a6c7cd (patch)
treef58428afc7c75b876b3bd11822a56ceeca30fdc5
parentde0084590bc34c2c23cb3d7a754f3e98059f4cf2 (diff)
build fix for older kernels
-rw-r--r--shared-core/i915_irq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index 9b391b75..836a8c46 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -476,7 +476,11 @@ unlock:
* This code is called in a more safe envirmoent to handle the hotplugs.
* Add code here for hotplug love to userspace.
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+static void i915_hotplug_work_func(void *work)
+#else
static void i915_hotplug_work_func(struct work_struct *work)
+#endif
{
struct drm_device *dev = hotplug_dev;
int crt;
@@ -503,7 +507,11 @@ static void i915_hotplug_work_func(struct work_struct *work)
static int i915_run_hotplug_tasklet(struct drm_device *dev, uint32_t stat)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ static DECLARE_WORK(hotplug, i915_hotplug_work_func, NULL);
+#else
static DECLARE_WORK(hotplug, i915_hotplug_work_func);
+#endif
struct drm_i915_private *dev_priv = dev->dev_private;
hotplug_dev = dev;