summaryrefslogtreecommitdiff
path: root/linux-core/drm_compat.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-12-19 20:29:03 +1100
committerDave Airlie <airlied@linux.ie>2006-12-19 20:29:03 +1100
commit86ff2aeb9bfea357d5748b3587ab224e813b37b6 (patch)
tree7cc4afd1293c491e3074f6c1af339773136f6156 /linux-core/drm_compat.h
parent656c3a3737180d507bec352d56fbd9ef8b8a4feb (diff)
drm: remove all 2.4 support for drm development tree.
Bye bye 2.4 you served us well..
Diffstat (limited to 'linux-core/drm_compat.h')
-rw-r--r--linux-core/drm_compat.h92
1 files changed, 1 insertions, 91 deletions
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index c4e80e91..13a2ba81 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -86,92 +86,12 @@
pos = n, n = list_entry(n->member.next, typeof(*n), member))
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19)
-static inline struct page *vmalloc_to_page(void *vmalloc_addr)
-{
- unsigned long addr = (unsigned long)vmalloc_addr;
- struct page *page = NULL;
- pgd_t *pgd = pgd_offset_k(addr);
- pmd_t *pmd;
- pte_t *ptep, pte;
-
- if (!pgd_none(*pgd)) {
- pmd = pmd_offset(pgd, addr);
- if (!pmd_none(*pmd)) {
- preempt_disable();
- ptep = pte_offset_map(pmd, addr);
- pte = *ptep;
- if (pte_present(pte))
- page = pte_page(pte);
- pte_unmap(ptep);
- preempt_enable();
- }
- }
- return page;
-}
-#endif
-
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,2)
-#define down_write down
-#define up_write up
-#endif
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#define DRM_PCI_DEV(pdev) &pdev->dev
#else
#define DRM_PCI_DEV(pdev) NULL
#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)
-
-struct drm_sysfs_class;
-struct class_simple;
-struct device;
-
-#define pci_dev_put(x) do {} while (0)
-#define pci_get_subsys pci_find_subsys
-
-static inline struct class_device *DRM(sysfs_device_add) (struct drm_sysfs_class
- * cs, dev_t dev,
- struct device *
- device,
- const char *fmt,
- ...) {
- return NULL;
-}
-
-static inline void DRM(sysfs_device_remove) (dev_t dev) {
-}
-
-static inline void DRM(sysfs_destroy) (struct drm_sysfs_class * cs) {
-}
-
-static inline struct drm_sysfs_class *DRM(sysfs_create) (struct module * owner,
- char *name) {
- return NULL;
-}
-
-#ifndef pci_pretty_name
-#define pci_pretty_name(x) x->name
-#endif
-
-struct drm_device;
-static inline int radeon_create_i2c_busses(struct drm_device *dev)
-{
- return 0;
-};
-static inline void radeon_delete_i2c_busses(struct drm_device *dev)
-{
-};
-
-#endif
-
#ifndef __user
#define __user
#endif
@@ -184,18 +104,12 @@ static inline void radeon_delete_i2c_busses(struct drm_device *dev)
#define __GFP_COMP 0
#endif
-#ifndef REMAP_PAGE_RANGE_5_ARGS
-#define DRM_RPR_ARG(vma)
-#else
-#define DRM_RPR_ARG(vma) vma,
-#endif
-
#define VM_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t pgprot)
{
- return remap_page_range(DRM_RPR_ARG(vma) from,
+ return remap_page_range(vma, from,
pfn << PAGE_SHIFT,
size,
pgprot);
@@ -221,10 +135,6 @@ static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long from
#define __x86_64__
#endif
-#ifndef pci_pretty_name
-#define pci_pretty_name(dev) ""
-#endif
-
/* sysfs __ATTR macro */
#ifndef __ATTR
#define __ATTR(_name,_mode,_show,_store) { \