summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Kuehling <fxkuehl@gmx.de>2003-12-17 12:59:37 +0000
committerFelix Kuehling <fxkuehl@gmx.de>2003-12-17 12:59:37 +0000
commit865403356cf53c999dc02a23b3606df46a846db5 (patch)
tree7e8bbfdc95c5701df80dfe0a86dc4d5304a3261c
parente96f76ef93812c2fc4e350080149c60b5cbaf95f (diff)
downloaddrm-865403356cf53c999dc02a23b3606df46a846db5.tar.gz
Quick and dirty hack to make savage DRM compile with 2.6 kernels. Won't
work with non-AGP cards.
-rw-r--r--linux-core/savage_drv.c8
-rw-r--r--linux/savage_drv.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/linux-core/savage_drv.c b/linux-core/savage_drv.c
index af7efb25..8013c520 100644
--- a/linux-core/savage_drv.c
+++ b/linux-core/savage_drv.c
@@ -42,6 +42,8 @@
/* mark off by Jiayo Hsu, Oct. 23, 2001*/
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
+
#define DRIVER_IOCTLS \
[DRM_IOCTL_NR(DRM_IOCTL_SAVAGE_ALLOC_CONTINUOUS_MEM)] \
= {savage_alloc_continuous_mem,1,0},\
@@ -226,8 +228,10 @@ int savage_free_cont_mem(struct inode *inode, struct file *filp,
free_pages((unsigned long)map->handle, get_order(size));
return 1;
-}
-
+}
+#else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) */
+#define DRIVER_IOCTLS
+#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) */
#if 0
diff --git a/linux/savage_drv.c b/linux/savage_drv.c
index af7efb25..8013c520 100644
--- a/linux/savage_drv.c
+++ b/linux/savage_drv.c
@@ -42,6 +42,8 @@
/* mark off by Jiayo Hsu, Oct. 23, 2001*/
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
+
#define DRIVER_IOCTLS \
[DRM_IOCTL_NR(DRM_IOCTL_SAVAGE_ALLOC_CONTINUOUS_MEM)] \
= {savage_alloc_continuous_mem,1,0},\
@@ -226,8 +228,10 @@ int savage_free_cont_mem(struct inode *inode, struct file *filp,
free_pages((unsigned long)map->handle, get_order(size));
return 1;
-}
-
+}
+#else /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) */
+#define DRIVER_IOCTLS
+#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) */
#if 0