aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/armada/armada_drv.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c2
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c2
-rw-r--r--drivers/gpu/drm/i810/i810_dma.c2
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c2
-rw-r--r--drivers/gpu/drm/i915/i915_ioc32.c2
-rw-r--r--drivers/gpu/drm/mga/mga_ioc32.c2
-rw-r--r--drivers/gpu/drm/mga/mga_state.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_ioc32.c2
-rw-r--r--drivers/gpu/drm/qxl/qxl_ioctl.c2
-rw-r--r--drivers/gpu/drm/r128/r128_ioc32.c2
-rw-r--r--drivers/gpu/drm/r128/r128_state.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_ioc32.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_state.c2
-rw-r--r--drivers/gpu/drm/savage/savage_bci.c2
-rw-r--r--drivers/gpu/drm/sis/sis_mm.c2
-rw-r--r--drivers/gpu/drm/via/via_dma.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c2
-rw-r--r--include/drm/drmP.h2
20 files changed, 19 insertions, 21 deletions
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index 567cfbde0883..8ab3cd1a8cdb 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -402,7 +402,7 @@ static struct platform_driver armada_drm_platform_driver = {
402 402
403static int __init armada_drm_init(void) 403static int __init armada_drm_init(void)
404{ 404{
405 armada_drm_driver.num_ioctls = DRM_ARRAY_SIZE(armada_ioctls); 405 armada_drm_driver.num_ioctls = ARRAY_SIZE(armada_ioctls);
406 return platform_driver_register(&armada_drm_platform_driver); 406 return platform_driver_register(&armada_drm_platform_driver);
407} 407}
408module_init(armada_drm_init); 408module_init(armada_drm_init);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 5d225dd58a87..d91f27777537 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -573,7 +573,7 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
573 int ret; 573 int ret;
574 574
575 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 575 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
576 exynos_drm_driver.num_ioctls = DRM_ARRAY_SIZE(exynos_ioctls); 576 exynos_drm_driver.num_ioctls = ARRAY_SIZE(exynos_ioctls);
577 577
578#ifdef CONFIG_DRM_EXYNOS_FIMD 578#ifdef CONFIG_DRM_EXYNOS_FIMD
579 ret = platform_driver_register(&fimd_driver); 579 ret = platform_driver_register(&fimd_driver);
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 59ea45e5c97e..6e8fe9ec02b5 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -477,7 +477,7 @@ static struct drm_driver driver = {
477 .lastclose = psb_driver_lastclose, 477 .lastclose = psb_driver_lastclose,
478 .preclose = psb_driver_preclose, 478 .preclose = psb_driver_preclose,
479 479
480 .num_ioctls = DRM_ARRAY_SIZE(psb_ioctls), 480 .num_ioctls = ARRAY_SIZE(psb_ioctls),
481 .device_is_agp = psb_driver_device_is_agp, 481 .device_is_agp = psb_driver_device_is_agp,
482 .irq_preinstall = psb_irq_preinstall, 482 .irq_preinstall = psb_irq_preinstall,
483 .irq_postinstall = psb_irq_postinstall, 483 .irq_postinstall = psb_irq_postinstall,
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
index aeace37415aa..e88bac1d781f 100644
--- a/drivers/gpu/drm/i810/i810_dma.c
+++ b/drivers/gpu/drm/i810/i810_dma.c
@@ -1251,7 +1251,7 @@ const struct drm_ioctl_desc i810_ioctls[] = {
1251 DRM_IOCTL_DEF_DRV(I810_FLIP, i810_flip_bufs, DRM_AUTH|DRM_UNLOCKED), 1251 DRM_IOCTL_DEF_DRV(I810_FLIP, i810_flip_bufs, DRM_AUTH|DRM_UNLOCKED),
1252}; 1252};
1253 1253
1254int i810_max_ioctl = DRM_ARRAY_SIZE(i810_ioctls); 1254int i810_max_ioctl = ARRAY_SIZE(i810_ioctls);
1255 1255
1256/** 1256/**
1257 * Determine if the device really is AGP or not. 1257 * Determine if the device really is AGP or not.
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index b9159ade5e85..4c22a5b7f4c5 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1986,7 +1986,7 @@ const struct drm_ioctl_desc i915_ioctls[] = {
1986 DRM_IOCTL_DEF_DRV(I915_GEM_USERPTR, i915_gem_userptr_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW), 1986 DRM_IOCTL_DEF_DRV(I915_GEM_USERPTR, i915_gem_userptr_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW),
1987}; 1987};
1988 1988
1989int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); 1989int i915_max_ioctl = ARRAY_SIZE(i915_ioctls);
1990 1990
1991/* 1991/*
1992 * This is really ugly: Because old userspace abused the linux agp interface to 1992 * This is really ugly: Because old userspace abused the linux agp interface to
diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
index 3c59584161c2..2e0613e26251 100644
--- a/drivers/gpu/drm/i915/i915_ioc32.c
+++ b/drivers/gpu/drm/i915/i915_ioc32.c
@@ -208,7 +208,7 @@ long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
208 if (nr < DRM_COMMAND_BASE) 208 if (nr < DRM_COMMAND_BASE)
209 return drm_compat_ioctl(filp, cmd, arg); 209 return drm_compat_ioctl(filp, cmd, arg);
210 210
211 if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(i915_compat_ioctls)) 211 if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls))
212 fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE]; 212 fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE];
213 213
214 if (fn != NULL) 214 if (fn != NULL)
diff --git a/drivers/gpu/drm/mga/mga_ioc32.c b/drivers/gpu/drm/mga/mga_ioc32.c
index 86b4bb804852..729bfd56b55f 100644
--- a/drivers/gpu/drm/mga/mga_ioc32.c
+++ b/drivers/gpu/drm/mga/mga_ioc32.c
@@ -214,7 +214,7 @@ long mga_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
214 if (nr < DRM_COMMAND_BASE) 214 if (nr < DRM_COMMAND_BASE)
215 return drm_compat_ioctl(filp, cmd, arg); 215 return drm_compat_ioctl(filp, cmd, arg);
216 216
217 if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(mga_compat_ioctls)) 217 if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(mga_compat_ioctls))
218 fn = mga_compat_ioctls[nr - DRM_COMMAND_BASE]; 218 fn = mga_compat_ioctls[nr - DRM_COMMAND_BASE];
219 219
220 if (fn != NULL) 220 if (fn != NULL)
diff --git a/drivers/gpu/drm/mga/mga_state.c b/drivers/gpu/drm/mga/mga_state.c
index 3cb58df5237e..792f924496fc 100644
--- a/drivers/gpu/drm/mga/mga_state.c
+++ b/drivers/gpu/drm/mga/mga_state.c
@@ -1099,4 +1099,4 @@ const struct drm_ioctl_desc mga_ioctls[] = {
1099 DRM_IOCTL_DEF_DRV(MGA_DMA_BOOTSTRAP, mga_dma_bootstrap, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), 1099 DRM_IOCTL_DEF_DRV(MGA_DMA_BOOTSTRAP, mga_dma_bootstrap, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
1100}; 1100};
1101 1101
1102int mga_max_ioctl = DRM_ARRAY_SIZE(mga_ioctls); 1102int mga_max_ioctl = ARRAY_SIZE(mga_ioctls);
diff --git a/drivers/gpu/drm/nouveau/nouveau_ioc32.c b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
index c1a7e5a73a26..462679a8fec5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ioc32.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
@@ -57,7 +57,7 @@ long nouveau_compat_ioctl(struct file *filp, unsigned int cmd,
57 return drm_compat_ioctl(filp, cmd, arg); 57 return drm_compat_ioctl(filp, cmd, arg);
58 58
59#if 0 59#if 0
60 if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(mga_compat_ioctls)) 60 if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(mga_compat_ioctls))
61 fn = nouveau_compat_ioctls[nr - DRM_COMMAND_BASE]; 61 fn = nouveau_compat_ioctls[nr - DRM_COMMAND_BASE];
62#endif 62#endif
63 if (fn != NULL) 63 if (fn != NULL)
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c
index 0bb86e6d41b4..b110883f8253 100644
--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
+++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
@@ -451,4 +451,4 @@ const struct drm_ioctl_desc qxl_ioctls[] = {
451 DRM_AUTH|DRM_UNLOCKED), 451 DRM_AUTH|DRM_UNLOCKED),
452}; 452};
453 453
454int qxl_max_ioctls = DRM_ARRAY_SIZE(qxl_ioctls); 454int qxl_max_ioctls = ARRAY_SIZE(qxl_ioctls);
diff --git a/drivers/gpu/drm/r128/r128_ioc32.c b/drivers/gpu/drm/r128/r128_ioc32.c
index b0d0fd3e4376..663f38c63ba6 100644
--- a/drivers/gpu/drm/r128/r128_ioc32.c
+++ b/drivers/gpu/drm/r128/r128_ioc32.c
@@ -203,7 +203,7 @@ long r128_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
203 if (nr < DRM_COMMAND_BASE) 203 if (nr < DRM_COMMAND_BASE)
204 return drm_compat_ioctl(filp, cmd, arg); 204 return drm_compat_ioctl(filp, cmd, arg);
205 205
206 if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(r128_compat_ioctls)) 206 if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(r128_compat_ioctls))
207 fn = r128_compat_ioctls[nr - DRM_COMMAND_BASE]; 207 fn = r128_compat_ioctls[nr - DRM_COMMAND_BASE];
208 208
209 if (fn != NULL) 209 if (fn != NULL)
diff --git a/drivers/gpu/drm/r128/r128_state.c b/drivers/gpu/drm/r128/r128_state.c
index 97064dd434c2..575e986f82a7 100644
--- a/drivers/gpu/drm/r128/r128_state.c
+++ b/drivers/gpu/drm/r128/r128_state.c
@@ -1641,4 +1641,4 @@ const struct drm_ioctl_desc r128_ioctls[] = {
1641 DRM_IOCTL_DEF_DRV(R128_GETPARAM, r128_getparam, DRM_AUTH), 1641 DRM_IOCTL_DEF_DRV(R128_GETPARAM, r128_getparam, DRM_AUTH),
1642}; 1642};
1643 1643
1644int r128_max_ioctl = DRM_ARRAY_SIZE(r128_ioctls); 1644int r128_max_ioctl = ARRAY_SIZE(r128_ioctls);
diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c
index bdb0f93e73bc..0b98ea134579 100644
--- a/drivers/gpu/drm/radeon/radeon_ioc32.c
+++ b/drivers/gpu/drm/radeon/radeon_ioc32.c
@@ -399,7 +399,7 @@ long radeon_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
399 if (nr < DRM_COMMAND_BASE) 399 if (nr < DRM_COMMAND_BASE)
400 return drm_compat_ioctl(filp, cmd, arg); 400 return drm_compat_ioctl(filp, cmd, arg);
401 401
402 if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(radeon_compat_ioctls)) 402 if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(radeon_compat_ioctls))
403 fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE]; 403 fn = radeon_compat_ioctls[nr - DRM_COMMAND_BASE];
404 404
405 if (fn != NULL) 405 if (fn != NULL)
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index eaaedba04675..f0717373a508 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -859,4 +859,4 @@ const struct drm_ioctl_desc radeon_ioctls_kms[] = {
859 DRM_IOCTL_DEF_DRV(RADEON_GEM_VA, radeon_gem_va_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW), 859 DRM_IOCTL_DEF_DRV(RADEON_GEM_VA, radeon_gem_va_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
860 DRM_IOCTL_DEF_DRV(RADEON_GEM_OP, radeon_gem_op_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW), 860 DRM_IOCTL_DEF_DRV(RADEON_GEM_OP, radeon_gem_op_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
861}; 861};
862int radeon_max_kms_ioctl = DRM_ARRAY_SIZE(radeon_ioctls_kms); 862int radeon_max_kms_ioctl = ARRAY_SIZE(radeon_ioctls_kms);
diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
index b576549fc783..23bb64fd775f 100644
--- a/drivers/gpu/drm/radeon/radeon_state.c
+++ b/drivers/gpu/drm/radeon/radeon_state.c
@@ -3258,4 +3258,4 @@ struct drm_ioctl_desc radeon_ioctls[] = {
3258 DRM_IOCTL_DEF_DRV(RADEON_CS, r600_cs_legacy_ioctl, DRM_AUTH) 3258 DRM_IOCTL_DEF_DRV(RADEON_CS, r600_cs_legacy_ioctl, DRM_AUTH)
3259}; 3259};
3260 3260
3261int radeon_max_ioctl = DRM_ARRAY_SIZE(radeon_ioctls); 3261int radeon_max_ioctl = ARRAY_SIZE(radeon_ioctls);
diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c
index d2b2df9e26f3..c97cdc9ab239 100644
--- a/drivers/gpu/drm/savage/savage_bci.c
+++ b/drivers/gpu/drm/savage/savage_bci.c
@@ -1079,4 +1079,4 @@ const struct drm_ioctl_desc savage_ioctls[] = {
1079 DRM_IOCTL_DEF_DRV(SAVAGE_BCI_EVENT_WAIT, savage_bci_event_wait, DRM_AUTH), 1079 DRM_IOCTL_DEF_DRV(SAVAGE_BCI_EVENT_WAIT, savage_bci_event_wait, DRM_AUTH),
1080}; 1080};
1081 1081
1082int savage_max_ioctl = DRM_ARRAY_SIZE(savage_ioctls); 1082int savage_max_ioctl = ARRAY_SIZE(savage_ioctls);
diff --git a/drivers/gpu/drm/sis/sis_mm.c b/drivers/gpu/drm/sis/sis_mm.c
index 0573be0d2933..77f288e4a0a6 100644
--- a/drivers/gpu/drm/sis/sis_mm.c
+++ b/drivers/gpu/drm/sis/sis_mm.c
@@ -359,4 +359,4 @@ const struct drm_ioctl_desc sis_ioctls[] = {
359 DRM_IOCTL_DEF_DRV(SIS_FB_INIT, sis_fb_init, DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY), 359 DRM_IOCTL_DEF_DRV(SIS_FB_INIT, sis_fb_init, DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY),
360}; 360};
361 361
362int sis_max_ioctl = DRM_ARRAY_SIZE(sis_ioctls); 362int sis_max_ioctl = ARRAY_SIZE(sis_ioctls);
diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c
index a18479c6b6da..6fc0648dd37f 100644
--- a/drivers/gpu/drm/via/via_dma.c
+++ b/drivers/gpu/drm/via/via_dma.c
@@ -737,4 +737,4 @@ const struct drm_ioctl_desc via_ioctls[] = {
737 DRM_IOCTL_DEF_DRV(VIA_BLIT_SYNC, via_dma_blit_sync, DRM_AUTH) 737 DRM_IOCTL_DEF_DRV(VIA_BLIT_SYNC, via_dma_blit_sync, DRM_AUTH)
738}; 738};
739 739
740int via_max_ioctl = DRM_ARRAY_SIZE(via_ioctls); 740int via_max_ioctl = ARRAY_SIZE(via_ioctls);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 6bdd15eea7e8..246a62bab378 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1417,7 +1417,7 @@ static struct drm_driver driver = {
1417 .enable_vblank = vmw_enable_vblank, 1417 .enable_vblank = vmw_enable_vblank,
1418 .disable_vblank = vmw_disable_vblank, 1418 .disable_vblank = vmw_disable_vblank,
1419 .ioctls = vmw_ioctls, 1419 .ioctls = vmw_ioctls,
1420 .num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls), 1420 .num_ioctls = ARRAY_SIZE(vmw_ioctls),
1421 .master_create = vmw_master_create, 1421 .master_create = vmw_master_create,
1422 .master_destroy = vmw_master_destroy, 1422 .master_destroy = vmw_master_destroy,
1423 .master_set = vmw_master_set, 1423 .master_set = vmw_master_set,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 83222db41566..8af71a8e2c00 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -234,8 +234,6 @@ int drm_err(const char *func, const char *format, ...);
234/** \name Internal types and structures */ 234/** \name Internal types and structures */
235/*@{*/ 235/*@{*/
236 236
237#define DRM_ARRAY_SIZE(x) ARRAY_SIZE(x)
238
239#define DRM_IF_VERSION(maj, min) (maj << 16 | min) 237#define DRM_IF_VERSION(maj, min) (maj << 16 | min)
240 238
241/** 239/**