From 52f0bc3c9ec722c0c8a40bb7959e7ec2eb9d8180 Mon Sep 17 00:00:00 2001 From: Rik Faith Date: Fri, 29 Sep 2000 02:05:41 +0000 Subject: [PATCH] More changes for sync with Linux 2.4.0-test9-pre7 --- linux-core/README.drm | 1 - linux-core/drmP.h | 5 ----- linux/README.drm | 1 - linux/drm.h | 7 ++----- linux/drmP.h | 5 ----- linux/mga_context.c | 4 +--- shared-core/drm.h | 7 ++----- shared/drm.h | 7 ++----- 8 files changed, 7 insertions(+), 30 deletions(-) diff --git a/linux-core/README.drm b/linux-core/README.drm index 5c293fb..6441e01 100644 --- a/linux-core/README.drm +++ b/linux-core/README.drm @@ -1,4 +1,3 @@ - ************************************************************ * For the very latest on DRI development, please see: * * http://dri.sourceforge.net/ * diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 1f88341..6be90c5 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -152,11 +152,6 @@ typedef struct wait_queue *wait_queue_head_t; #define module_exit(x) void cleanup_module(void) { x(); } #endif - /* virt_to_page added in 2.4.0-test6 */ -#if LINUX_VERSION_CODE < 0x020400 -#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr)) -#endif - /* Generic cmpxchg added in 2.3.x */ #ifndef __HAVE_ARCH_CMPXCHG /* Include this here so that driver can be diff --git a/linux/README.drm b/linux/README.drm index 5c293fb..6441e01 100644 --- a/linux/README.drm +++ b/linux/README.drm @@ -1,4 +1,3 @@ - ************************************************************ * For the very latest on DRI development, please see: * * http://dri.sourceforge.net/ * diff --git a/linux/drm.h b/linux/drm.h index 7177147..b182f2c 100644 --- a/linux/drm.h +++ b/linux/drm.h @@ -37,8 +37,10 @@ #if defined(__linux__) #include /* For _IO* macros */ +#define DRM_IOCTL_NR(n) _IOC_NR(n) #elif defined(__FreeBSD__) #include +#define DRM_IOCTL_NR(n) ((n) & 0xff) #endif #define DRM_PROC_DEVICES "/proc/devices" @@ -293,11 +295,6 @@ typedef struct drm_agp_info { } drm_agp_info_t; #define DRM_IOCTL_BASE 'd' -#if defined(__linux__) -#define DRM_IOCTL_NR(n) _IOC_NR(n) -#elif defined(__FreeBSD__) -#define DRM_IOCTL_NR(n) ((n) & 0xff) -#endif #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) #define DRM_IOR(nr,size) _IOR(DRM_IOCTL_BASE,nr,size) #define DRM_IOW(nr,size) _IOW(DRM_IOCTL_BASE,nr,size) diff --git a/linux/drmP.h b/linux/drmP.h index 1f88341..6be90c5 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -152,11 +152,6 @@ typedef struct wait_queue *wait_queue_head_t; #define module_exit(x) void cleanup_module(void) { x(); } #endif - /* virt_to_page added in 2.4.0-test6 */ -#if LINUX_VERSION_CODE < 0x020400 -#define virt_to_page(kaddr) (mem_map + MAP_NR(kaddr)) -#endif - /* Generic cmpxchg added in 2.3.x */ #ifndef __HAVE_ARCH_CMPXCHG /* Include this here so that driver can be diff --git a/linux/mga_context.c b/linux/mga_context.c index 5125cff..b26c7c9 100644 --- a/linux/mga_context.c +++ b/linux/mga_context.c @@ -199,9 +199,7 @@ int mga_rmctx(struct inode *inode, struct file *filp, unsigned int cmd, if (copy_from_user(&ctx, (drm_ctx_t *)arg, sizeof(ctx))) return -EFAULT; DRM_DEBUG("%d\n", ctx.handle); - if(ctx.handle == DRM_KERNEL_CONTEXT+1) { - priv->remove_auth_on_close = 1; - } + if(ctx.handle == DRM_KERNEL_CONTEXT+1) priv->remove_auth_on_close = 1; if(ctx.handle != DRM_KERNEL_CONTEXT) { drm_ctxbitmap_free(dev, ctx.handle); diff --git a/shared-core/drm.h b/shared-core/drm.h index 7177147..b182f2c 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -37,8 +37,10 @@ #if defined(__linux__) #include /* For _IO* macros */ +#define DRM_IOCTL_NR(n) _IOC_NR(n) #elif defined(__FreeBSD__) #include +#define DRM_IOCTL_NR(n) ((n) & 0xff) #endif #define DRM_PROC_DEVICES "/proc/devices" @@ -293,11 +295,6 @@ typedef struct drm_agp_info { } drm_agp_info_t; #define DRM_IOCTL_BASE 'd' -#if defined(__linux__) -#define DRM_IOCTL_NR(n) _IOC_NR(n) -#elif defined(__FreeBSD__) -#define DRM_IOCTL_NR(n) ((n) & 0xff) -#endif #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) #define DRM_IOR(nr,size) _IOR(DRM_IOCTL_BASE,nr,size) #define DRM_IOW(nr,size) _IOW(DRM_IOCTL_BASE,nr,size) diff --git a/shared/drm.h b/shared/drm.h index 7177147..b182f2c 100644 --- a/shared/drm.h +++ b/shared/drm.h @@ -37,8 +37,10 @@ #if defined(__linux__) #include /* For _IO* macros */ +#define DRM_IOCTL_NR(n) _IOC_NR(n) #elif defined(__FreeBSD__) #include +#define DRM_IOCTL_NR(n) ((n) & 0xff) #endif #define DRM_PROC_DEVICES "/proc/devices" @@ -293,11 +295,6 @@ typedef struct drm_agp_info { } drm_agp_info_t; #define DRM_IOCTL_BASE 'd' -#if defined(__linux__) -#define DRM_IOCTL_NR(n) _IOC_NR(n) -#elif defined(__FreeBSD__) -#define DRM_IOCTL_NR(n) ((n) & 0xff) -#endif #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) #define DRM_IOR(nr,size) _IOR(DRM_IOCTL_BASE,nr,size) #define DRM_IOW(nr,size) _IOW(DRM_IOCTL_BASE,nr,size) -- 2.7.4