summaryrefslogtreecommitdiff
path: root/linux-core/drm_bo.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-01-07 22:37:40 -0800
committerKeith Packard <keithp@neko.keithp.com>2007-01-07 22:37:40 -0800
commitc5aaf7648df82665851c9e67f5509b427ca34c8e (patch)
tree55b317738a99097cb02ba6a736b9ef20de6b34f3 /linux-core/drm_bo.c
parent63c0f3946056d044b7c5688fa5cb670782212c77 (diff)
parentd0080d71b9f3df0d4f743324b7e8f1ce580bdcaf (diff)
Merge branch 'master' into crestline
Conflicts: shared-core/i915_drm.h Whitespace change only
Diffstat (limited to 'linux-core/drm_bo.c')
-rw-r--r--linux-core/drm_bo.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index 65e24fb6..c0e431b4 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -352,10 +352,20 @@ static void drm_bo_delayed_delete(drm_device_t * dev, int remove_all)
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static void drm_bo_delayed_workqueue(void *data)
+#else
+static void drm_bo_delayed_workqueue(struct work_struct *work)
+#endif
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
drm_device_t *dev = (drm_device_t *) data;
drm_buffer_manager_t *bm = &dev->bm;
+#else
+ drm_buffer_manager_t *bm = container_of(work, drm_buffer_manager_t, wq.work);
+ drm_device_t *dev = container_of(bm, drm_device_t, bm);
+#endif
+
DRM_DEBUG("Delayed delete Worker\n");
@@ -1904,7 +1914,11 @@ int drm_bo_driver_init(drm_device_t * dev)
if (ret)
goto out_unlock;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
INIT_WORK(&bm->wq, &drm_bo_delayed_workqueue, dev);
+#else
+ INIT_DELAYED_WORK(&bm->wq, drm_bo_delayed_workqueue);
+#endif
bm->initialized = 1;
bm->nice_mode = 1;
atomic_set(&bm->count, 0);