diff options
author | Pekka Paalanen <pq@iki.fi> | 2009-03-02 22:39:32 +0200 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2009-03-02 22:39:32 +0200 |
commit | 081b2d6da22e08e1448285d647a35b17905512cf (patch) | |
tree | 90a112aea9f57edcd8a8a68ccdfb21149a6f1425 /linux-core | |
parent | 62f4344c98b72535df88a5a3d577c1df314e4f9b (diff) |
drm: drop Linux < 2.6.18 support
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_compat.c | 45 | ||||
-rw-r--r-- | linux-core/drm_compat.h | 11 |
2 files changed, 0 insertions, 56 deletions
diff --git a/linux-core/drm_compat.c b/linux-core/drm_compat.c index e90338f0..ff4085de 100644 --- a/linux-core/drm_compat.c +++ b/linux-core/drm_compat.c @@ -583,51 +583,6 @@ EXPORT_SYMBOL(idr_remove_all); #endif /* DRM_IDR_COMPAT_FN */ - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) -/** - * idr_replace - replace pointer for given id - * @idp: idr handle - * @ptr: pointer you want associated with the id - * @id: lookup key - * - * Replace the pointer registered with an id and return the old value. - * A -ENOENT return indicates that @id was not found. - * A -EINVAL return indicates that @id was not within valid constraints. - * - * The caller must serialize vs idr_find(), idr_get_new(), and idr_remove(). - */ -void *idr_replace(struct idr *idp, void *ptr, int id) -{ - int n; - struct idr_layer *p, *old_p; - - n = idp->layers * IDR_BITS; - p = idp->top; - - id &= MAX_ID_MASK; - - if (id >= (1 << n)) - return ERR_PTR(-EINVAL); - - n -= IDR_BITS; - while ((n > 0) && p) { - p = p->ary[(id >> n) & IDR_MASK]; - n -= IDR_BITS; - } - - n = id & IDR_MASK; - if (unlikely(p == NULL || !test_bit(n, &p->bitmap))) - return ERR_PTR(-ENOENT); - - old_p = p->ary[n]; - p->ary[n] = ptr; - - return (void *)old_p; -} -EXPORT_SYMBOL(idr_replace); -#endif - #ifdef DRM_FULL_MM_COMPAT #ifdef DRM_NO_FAULT unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma, diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 7763da34..61a6d3d7 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -125,12 +125,6 @@ } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -#define vmalloc_user(_size) ({void * tmp = vmalloc(_size); \ - if (tmp) memset(tmp, 0, size); \ - (tmp);}) -#endif - #ifndef list_for_each_entry_safe_reverse #define list_for_each_entry_safe_reverse(pos, n, head, member) \ for (pos = list_entry((head)->prev, typeof(*pos), member), \ @@ -275,11 +269,6 @@ int idr_for_each(struct idr *idp, void idr_remove_all(struct idr *idp); #endif - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) -void *idr_replace(struct idr *idp, void *ptr, int id); -#endif - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) typedef _Bool bool; #endif |