aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-03-27 09:51:55 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-27 11:08:29 -0400
commit9c7d3d3e289c9870ae688780a0f9807bb5ae9faf (patch)
tree9a60b3db45c3ad130257c2e6f4155afb954856f4
parent4218a32f55fc71983e4c1c6e5b98b28db8226b3b (diff)
drm: Fix DRM_IOCTL_DEF_DRV()
Currently DRM_IOCTL_DEF_DRV does '[DRM_IOCTL_NR(DRM_##ioctl)]' which doesn't make much sense since DRM_##ioctl is already a the raw ioctl number. So change it to 'DRM_IOCTL_NR(DRM_IOCTL_##ioctl) - DRM_COMMAND_BASE' which means the DRM_IOCTL_NR() now makes sense, and also this also means if there's a mistake in the DRM_IOCTL_##ioctl macros we might get a warning about it (eg. we would have gotten a sparse warning about the i915 colorkey get/set ioctl being defined to be the same thing). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--include/drm/drmP.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 63c0b0131f61..6195ee9b4c2a 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -263,7 +263,7 @@ struct drm_ioctl_desc {
263 */ 263 */
264 264
265#define DRM_IOCTL_DEF_DRV(ioctl, _func, _flags) \ 265#define DRM_IOCTL_DEF_DRV(ioctl, _func, _flags) \
266 [DRM_IOCTL_NR(DRM_##ioctl)] = {.cmd = DRM_##ioctl, .func = _func, .flags = _flags, .cmd_drv = DRM_IOCTL_##ioctl, .name = #ioctl} 266 [DRM_IOCTL_NR(DRM_IOCTL_##ioctl) - DRM_COMMAND_BASE] = {.cmd = DRM_##ioctl, .func = _func, .flags = _flags, .cmd_drv = DRM_IOCTL_##ioctl, .name = #ioctl}
267 267
268/* Event queued up for userspace to read */ 268/* Event queued up for userspace to read */
269struct drm_pending_event { 269struct drm_pending_event {