diff options
author | Rik Faith <faith@alephnull.com> | 2000-08-28 19:50:52 +0000 |
---|---|---|
committer | Rik Faith <faith@alephnull.com> | 2000-08-28 19:50:52 +0000 |
commit | 32cebaf750b82639822f5f50d0aa8a4417595ada (patch) | |
tree | 302cadb8dea2bb37491713bbc4b6ceac21f22021 /linux-core | |
parent | 6f07e1ff6bec8f306e8aa1d59b8bcaa93ffa776e (diff) |
Add compatibility header file to make Linux 2.4.0 kernel patches cleaner.
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drmP.h | 8 | ||||
-rw-r--r-- | linux-core/i810_dma.c | 3 | ||||
-rw-r--r-- | linux-core/i810_drv.c | 2 | ||||
-rw-r--r-- | linux-core/mga_drv.c | 2 | ||||
-rw-r--r-- | linux-core/r128_drv.c | 5 | ||||
-rw-r--r-- | linux-core/sis_drv.c | 5 |
6 files changed, 6 insertions, 19 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index b9a4dab4..d6de193d 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -61,6 +61,9 @@ #include <linux/tqueue.h> #include <linux/poll.h> #endif +#if LINUX_VERSION_CODE < 0x020400 +#include "compat-pre24.h" +#endif #include "drm.h" #define DRM_DEBUG_CODE 2 /* Include debugging code (if > 1, then @@ -140,11 +143,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-core/i810_dma.c b/linux-core/i810_dma.c index 5792bf39..14c78071 100644 --- a/linux-core/i810_dma.c +++ b/linux-core/i810_dma.c @@ -1227,7 +1227,6 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd, } if (!ret) { -#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */ sigemptyset(&dev->sigmask); sigaddset(&dev->sigmask, SIGSTOP); sigaddset(&dev->sigmask, SIGTSTP); @@ -1236,7 +1235,7 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd, dev->sigdata.context = lock.context; dev->sigdata.lock = dev->lock.hw_lock; block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask); -#endif + if (lock.flags & _DRM_LOCK_QUIESCENT) { DRM_DEBUG("_DRM_LOCK_QUIESCENT\n"); DRM_DEBUG("fred\n"); diff --git a/linux-core/i810_drv.c b/linux-core/i810_drv.c index 18168605..183e7fd7 100644 --- a/linux-core/i810_drv.c +++ b/linux-core/i810_drv.c @@ -642,8 +642,6 @@ int i810_unlock(struct inode *inode, struct file *filp, unsigned int cmd, - dev->lck_start)]); #endif -#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */ unblock_all_signals(); -#endif return 0; } diff --git a/linux-core/mga_drv.c b/linux-core/mga_drv.c index a4a8fe55..f6a4a43b 100644 --- a/linux-core/mga_drv.c +++ b/linux-core/mga_drv.c @@ -655,8 +655,6 @@ int mga_unlock(struct inode *inode, struct file *filp, unsigned int cmd, DRM_ERROR("\n"); } -#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */ unblock_all_signals(); -#endif return 0; } diff --git a/linux-core/r128_drv.c b/linux-core/r128_drv.c index c4eb634d..bb24b13e 100644 --- a/linux-core/r128_drv.c +++ b/linux-core/r128_drv.c @@ -656,7 +656,6 @@ int r128_lock(struct inode *inode, struct file *filp, unsigned int cmd, #endif if (!ret) { -#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */ sigemptyset(&dev->sigmask); sigaddset(&dev->sigmask, SIGSTOP); sigaddset(&dev->sigmask, SIGTSTP); @@ -665,7 +664,7 @@ int r128_lock(struct inode *inode, struct file *filp, unsigned int cmd, dev->sigdata.context = lock.context; dev->sigdata.lock = dev->lock.hw_lock; block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask); -#endif + if (lock.flags & _DRM_LOCK_READY) { /* Wait for space in DMA/FIFO */ } @@ -730,8 +729,6 @@ int r128_unlock(struct inode *inode, struct file *filp, unsigned int cmd, } #endif -#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */ unblock_all_signals(); -#endif return 0; } diff --git a/linux-core/sis_drv.c b/linux-core/sis_drv.c index 434a1ccd..06ae7988 100644 --- a/linux-core/sis_drv.c +++ b/linux-core/sis_drv.c @@ -626,7 +626,6 @@ int sis_lock(struct inode *inode, struct file *filp, unsigned int cmd, #endif if (!ret) { -#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */ sigemptyset(&dev->sigmask); sigaddset(&dev->sigmask, SIGSTOP); sigaddset(&dev->sigmask, SIGTSTP); @@ -635,7 +634,7 @@ int sis_lock(struct inode *inode, struct file *filp, unsigned int cmd, dev->sigdata.context = lock.context; dev->sigdata.lock = dev->lock.hw_lock; block_all_signals(drm_notifier, &dev->sigdata, &dev->sigmask); -#endif + if (lock.flags & _DRM_LOCK_READY) { /* Wait for space in DMA/FIFO */ } @@ -687,9 +686,7 @@ int sis_unlock(struct inode *inode, struct file *filp, unsigned int cmd, } } -#if LINUX_VERSION_CODE >= 0x020400 /* KERNEL_VERSION(2,4,0) */ unblock_all_signals(); -#endif return 0; } |