summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-04-08 12:20:39 +0000
committerDave Airlie <airlied@linux.ie>2004-04-08 12:20:39 +0000
commit3e0f3c1fbb9b10bcc8e037f79f25d5e491dcfd91 (patch)
treeb9cd919817cb103e3a6308166fc62515643ba699
parent1bc7576474a85b649e2f3291d72890363e6d1483 (diff)
more 2.4 compat fns
-rw-r--r--linux-core/drmP.h10
-rw-r--r--linux/drmP.h10
2 files changed, 20 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index e35e60b3..ac54abb5 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -235,6 +235,16 @@ static inline struct page * vmalloc_to_page(void * vmalloc_addr)
}
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+static inline unsigned iminor(struct inode *inode)
+{
+ return MINOR(inode->i_rdev);
+}
+
+#define old_encode_dev(x) (x)
+
+#endif
+
#ifndef REMAP_PAGE_RANGE_5_ARGS
#define DRM_RPR_ARG(vma)
#else
diff --git a/linux/drmP.h b/linux/drmP.h
index e35e60b3..ac54abb5 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -235,6 +235,16 @@ static inline struct page * vmalloc_to_page(void * vmalloc_addr)
}
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+static inline unsigned iminor(struct inode *inode)
+{
+ return MINOR(inode->i_rdev);
+}
+
+#define old_encode_dev(x) (x)
+
+#endif
+
#ifndef REMAP_PAGE_RANGE_5_ARGS
#define DRM_RPR_ARG(vma)
#else