aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorRichard Kennedy <richard@rsk.demon.co.uk>2009-03-18 13:26:44 -0400
committerDave Airlie <airlied@redhat.com>2009-03-29 04:31:45 -0400
commitc972d750e4fa3bfee6e7d3635729bf8c9cbb8f0a (patch)
tree21636305d6828368d5b4d60a34ab0f1e3dca4a51 /include/drm/drmP.h
parent40fc6eab599d0087a75fc77eaaf04d769b667f6d (diff)
drm: reorder struct drm_ioctl_desc to save space on 64 bit builds
shrinks drm_ioctl_desc from 24 bytes to 16 bytes by reordering members to remove padding. updates DRM_IOCTL_DEF macro to initialise structure members by name to handle the structure reorder. The applied patch reduces data used in drm.ko from 10440 to 9032 Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index ccbcd13b6ed3..c8c422151431 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -281,16 +281,16 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
281 281
282struct drm_ioctl_desc { 282struct drm_ioctl_desc {
283 unsigned int cmd; 283 unsigned int cmd;
284 drm_ioctl_t *func;
285 int flags; 284 int flags;
285 drm_ioctl_t *func;
286}; 286};
287 287
288/** 288/**
289 * Creates a driver or general drm_ioctl_desc array entry for the given 289 * Creates a driver or general drm_ioctl_desc array entry for the given
290 * ioctl, for use by drm_ioctl(). 290 * ioctl, for use by drm_ioctl().
291 */ 291 */
292#define DRM_IOCTL_DEF(ioctl, func, flags) \ 292#define DRM_IOCTL_DEF(ioctl, _func, _flags) \
293 [DRM_IOCTL_NR(ioctl)] = {ioctl, func, flags} 293 [DRM_IOCTL_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags}
294 294
295struct drm_magic_entry { 295struct drm_magic_entry {
296 struct list_head head; 296 struct list_head head;