aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_drv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-05-08 01:28:15 -0400
committerDave Airlie <airlied@linux.ie>2007-05-08 01:28:15 -0400
commit0515b93c0ea89eb2120b0ec1d148359da01ad2e5 (patch)
tree34ec6b1dadf9f9282067c1d64ece204ddf2b3f9f /drivers/char/drm/drm_drv.c
parent453ff94ca502d0a7441912823f20ed130f685429 (diff)
drm: rename badly named define and cleanup ioctl code spacing
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_drv.c')
-rw-r--r--drivers/char/drm/drm_drv.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
index 26bec30ee86e..8e77b7ed0f44 100644
--- a/drivers/char/drm/drm_drv.c
+++ b/drivers/char/drm/drm_drv.c
@@ -15,8 +15,6 @@
15 * #define DRIVER_DESC "Matrox G200/G400" 15 * #define DRIVER_DESC "Matrox G200/G400"
16 * #define DRIVER_DATE "20001127" 16 * #define DRIVER_DATE "20001127"
17 * 17 *
18 * #define DRIVER_IOCTL_COUNT DRM_ARRAY_SIZE( mga_ioctls )
19 *
20 * #define drm_x mga_##x 18 * #define drm_x mga_##x
21 * \endcode 19 * \endcode
22 */ 20 */
@@ -120,7 +118,7 @@ static drm_ioctl_desc_t drm_ioctls[] = {
120 [DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW)] = {drm_update_drawable_info, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY}, 118 [DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW)] = {drm_update_drawable_info, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY},
121}; 119};
122 120
123#define DRIVER_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) 121#define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls )
124 122
125/** 123/**
126 * Take down the DRM device. 124 * Take down the DRM device.
@@ -496,11 +494,11 @@ int drm_ioctl(struct inode *inode, struct file *filp,
496 (long)old_encode_dev(priv->head->device), 494 (long)old_encode_dev(priv->head->device),
497 priv->authenticated); 495 priv->authenticated);
498 496
499 if ((nr >= DRIVER_IOCTL_COUNT) && 497 if ((nr >= DRM_CORE_IOCTL_COUNT) &&
500 ((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END))) 498 ((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END)))
501 goto err_i1; 499 goto err_i1;
502 if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END) 500 if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END) &&
503 && (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls)) 501 (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls))
504 ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE]; 502 ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE];
505 else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) 503 else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE))
506 ioctl = &drm_ioctls[nr]; 504 ioctl = &drm_ioctls[nr];