summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2002-10-16 21:20:46 +0000
committerIan Romanick <idr@us.ibm.com>2002-10-16 21:20:46 +0000
commit87ac0cdb2623711f92986859d54f18864d1ea215 (patch)
tree7d9400ba0e38efff15d392864c279f97cb020810
parent381e0fe7f8ee5a9500fdb91d83ce45915b64db5f (diff)
downloaddrm-87ac0cdb2623711f92986859d54f18864d1ea215.tar.gz
Applied the same work-around from i830_dma.c to enable compilation on Red
Hat kernels.
-rw-r--r--linux-core/i810_dma.c8
-rw-r--r--linux/i810_dma.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/linux-core/i810_dma.c b/linux-core/i810_dma.c
index f4eef3a3..94379bb7 100644
--- a/linux-core/i810_dma.c
+++ b/linux-core/i810_dma.c
@@ -39,6 +39,12 @@
#include <linux/interrupt.h> /* For task queue support */
#include <linux/delay.h>
+#ifdef DO_MUNMAP_4_ARGS
+#define DO_MUNMAP(m, a, l) do_munmap(m, a, l, 1)
+#else
+#define DO_MUNMAP(m, a, l) do_munmap(m, a, l)
+#endif
+
#define I810_BUF_FREE 2
#define I810_BUF_CLIENT 1
#define I810_BUF_HARDWARE 0
@@ -218,7 +224,7 @@ static int i810_unmap_buffer(drm_buf_t *buf)
#else
down_write( &current->mm->mmap_sem );
#endif
- retcode = do_munmap(current->mm,
+ retcode = DO_MUNMAP(current->mm,
(unsigned long)buf_priv->virtual,
(size_t) buf->total);
#if LINUX_VERSION_CODE <= 0x020402
diff --git a/linux/i810_dma.c b/linux/i810_dma.c
index f4eef3a3..94379bb7 100644
--- a/linux/i810_dma.c
+++ b/linux/i810_dma.c
@@ -39,6 +39,12 @@
#include <linux/interrupt.h> /* For task queue support */
#include <linux/delay.h>
+#ifdef DO_MUNMAP_4_ARGS
+#define DO_MUNMAP(m, a, l) do_munmap(m, a, l, 1)
+#else
+#define DO_MUNMAP(m, a, l) do_munmap(m, a, l)
+#endif
+
#define I810_BUF_FREE 2
#define I810_BUF_CLIENT 1
#define I810_BUF_HARDWARE 0
@@ -218,7 +224,7 @@ static int i810_unmap_buffer(drm_buf_t *buf)
#else
down_write( &current->mm->mmap_sem );
#endif
- retcode = do_munmap(current->mm,
+ retcode = DO_MUNMAP(current->mm,
(unsigned long)buf_priv->virtual,
(size_t) buf->total);
#if LINUX_VERSION_CODE <= 0x020402