diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:24:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:24:07 -0400 |
commit | 5f757f91e70a97eda8f0cc13bddc853209b2d173 (patch) | |
tree | e2e97796f5145b5d6eb3fee6ec93050d90f2bd7d /drivers/char/drm/drm_drv.c | |
parent | 9fa0853a85a3a4067e4ad0aaa5d90984c2dd21b5 (diff) | |
parent | ce7dd06372058f9e3e57ee4c0aeba694a43a80ad (diff) |
Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/i915: Add 965GM pci id update
drm: just use io_remap_pfn_range on all archs..
drm: fix DRM_CONSISTENT mapping
drm: fix up mmap locking in preparation for ttm changes
drm: fix driver deadlock with AIGLX and reclaim_buffers_locked
drm: fix warning in drm_fops.c
drm: allow for more generic drm ioctls
drm: fix alpha domain handling
via: fix CX700 pci id
drm: make drm_io_prot static.
drm: remove via_mm.h
drm: add missing NULL assignment
drm/radeon: Fix u32 overflows when determining AGP base address in card space.
drm: port over use_vmalloc code from git hashtab
drm: fix crash with fops lock and fixup sarea/page size locking
drm: bring bufs code from git tree.
drm: move protection stuff into separate function
drm: Use ARRAY_SIZE macro when appropriate
drm: update README.drm (bugzilla #7933)
drm: remove unused exports
Diffstat (limited to 'drivers/char/drm/drm_drv.c')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index f5b9b2480c14..26bec30ee86e 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c | |||
@@ -496,11 +496,14 @@ int drm_ioctl(struct inode *inode, struct file *filp, | |||
496 | (long)old_encode_dev(priv->head->device), | 496 | (long)old_encode_dev(priv->head->device), |
497 | priv->authenticated); | 497 | priv->authenticated); |
498 | 498 | ||
499 | if (nr < DRIVER_IOCTL_COUNT) | 499 | if ((nr >= DRIVER_IOCTL_COUNT) && |
500 | ioctl = &drm_ioctls[nr]; | 500 | ((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END))) |
501 | else if ((nr >= DRM_COMMAND_BASE) | 501 | goto err_i1; |
502 | if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END) | ||
502 | && (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls)) | 503 | && (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls)) |
503 | ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE]; | 504 | ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE]; |
505 | else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) | ||
506 | ioctl = &drm_ioctls[nr]; | ||
504 | else | 507 | else |
505 | goto err_i1; | 508 | goto err_i1; |
506 | 509 | ||