summaryrefslogtreecommitdiff
path: root/linux/fops.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2000-09-06 12:11:57 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2000-09-06 12:11:57 +0000
commit68380d1373cf7b01a6ae5c9440de7a52745af091 (patch)
tree42c623666b8746dae59e7ed2423a19ebaa68b9cd /linux/fops.c
parenta2020a33349c91a0036b1fde8ae0d0229ae8e005 (diff)
Merge trunk into tdfx-2-1-branchtdfx-2-1-20000906
Diffstat (limited to 'linux/fops.c')
-rw-r--r--linux/fops.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/linux/fops.c b/linux/fops.c
index 4ade7aa1..f3966d96 100644
--- a/linux/fops.c
+++ b/linux/fops.c
@@ -94,7 +94,8 @@ int drm_release(struct inode *inode, struct file *filp)
DRM_DEBUG("pid = %d, device = 0x%x, open_count = %d\n",
current->pid, dev->device, dev->open_count);
- if (_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
+ if (dev->lock.hw_lock
+ && _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
&& dev->lock.pid == current->pid) {
DRM_ERROR("Process %d dead, freeing lock for context %d\n",
current->pid,
@@ -222,8 +223,15 @@ int drm_write_string(drm_device_t *dev, const char *s)
KILLFASYNCHASTHREEPARAMETERS if three parameters are found. */
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO);
#else
- /* Parameter added in 2.3.21 */
+
+ /* Parameter added in 2.3.21. */
+#if LINUX_VERSION_CODE < 0x020400
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN);
+#else
+ /* Type of first parameter changed in
+ Linux 2.4.0-test2... */
+ if (dev->buf_async) kill_fasync(&dev->buf_async, SIGIO, POLL_IN);
+#endif
#endif
DRM_DEBUG("waking\n");
wake_up_interruptible(&dev->buf_readers);