summaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
diff options
context:
space:
mode:
authorNian Wu <nian.wu@intel.com>2007-03-19 17:00:31 +0800
committerNian Wu <nian.wu@intel.com>2007-03-19 17:00:31 +0800
commit8398b99d8d146278adc13d6093811e53cd42c88a (patch)
tree9da61388447defcfec68d7294989f6dc501d39ed /linux-core/drm_drv.c
parentdf73975980e926e350bf36bf4bc8a07220f66164 (diff)
parent1e77e52755c9bb94c9230778845e6701b4d82b3a (diff)
Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestline
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r--linux-core/drm_drv.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index ff9b29e7..bfa39ab7 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -442,7 +442,7 @@ void drm_exit(struct drm_driver *driver)
EXPORT_SYMBOL(drm_exit);
/** File operations structure */
-static struct file_operations drm_stub_fops = {
+static const struct file_operations drm_stub_fops = {
.owner = THIS_MODULE,
.open = drm_stub_open
};
@@ -591,21 +591,20 @@ int drm_ioctl(struct inode *inode, struct file *filp,
current->pid, cmd, nr, (long)old_encode_dev(priv->head->device),
priv->authenticated);
- if (nr >= DRIVER_IOCTL_COUNT &&
- (nr < DRM_COMMAND_BASE || nr >= DRM_COMMAND_END))
+ if ((nr >= DRIVER_IOCTL_COUNT) &&
+ ((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END)))
goto err_i1;
if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END)
&& (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls))
ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE];
- else if (nr >= DRM_COMMAND_END || nr < DRM_COMMAND_BASE)
+ else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE))
ioctl = &drm_ioctls[nr];
- else
+ else
goto err_i1;
-
-
func = ioctl->func;
- if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl) /* Local override? */
+ /* is there a local override? */
+ if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl)
func = dev->driver->dma_ioctl;
if (!func) {