[PATCH] drm: const'ify ioctls table
Ville Syrjälä
ville.syrjala at linux.intel.com
Fri Aug 2 03:51:32 PDT 2013
On Thu, Aug 01, 2013 at 02:25:27PM -0400, Rob Clark wrote:
> Because, there is no reason for it not to be const.
>
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
<snip>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> index 78e2164..eaf86e0 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -124,7 +124,7 @@
> * Ioctl definitions.
> */
>
> -static struct drm_ioctl_desc vmw_ioctls[] = {
> +static const struct drm_ioctl_desc vmw_ioctls[] = {
> VMW_IOCTL_DEF(VMW_GET_PARAM, vmw_getparam_ioctl,
> DRM_AUTH | DRM_UNLOCKED),
> VMW_IOCTL_DEF(VMW_ALLOC_DMABUF, vmw_dmabuf_alloc_ioctl,
You forgot to fix vmw_unlocked_ioctl().
Also if you're poking around this stuff, exynos and nouveau appear to
set .num_ioctls from the probe/init funcs even though the ioctls array
is right there in the same compilation unit.
--
Ville Syrjälä
Intel OTC
More information about the dri-devel
mailing list