]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm: Make the per-driver file_operations struct const
authorArjan van de Ven <arjan@infradead.org>
Mon, 31 Oct 2011 14:28:57 +0000 (07:28 -0700)
committerDave Airlie <airlied@redhat.com>
Fri, 11 Nov 2011 11:14:47 +0000 (11:14 +0000)
commite08e96de986ceb2c6b683df0bd0c4ddd4f91dcfd
tree632e9e5dc117204b0f1e78f57be6abdc6f4750f3
parentd68752cf7bb92eafbbe6a0df0d0fab67e87523f6
drm: Make the per-driver file_operations struct const

From fdf1fdebaa00f81de18c227f32f8074c8b352d50 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sun, 30 Oct 2011 19:06:07 -0700
Subject: [PATCH] drm: Make the per-driver file_operations struct const

The DRM layer keeps a copy of struct file_operations inside its
big driver struct... which prevents it from being consistent and static.
For consistency (and the general security objective of having such things
static), it's desirable to get this fixed.

This patch splits out the file_operations field to its own struct,
which is then "static const", and just stick a pointer to this into
the driver struct, making it more consistent with how the rest of the
kernel does this.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 files changed:
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/i810/i810_drv.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/mga/mga_drv.c
drivers/gpu/drm/nouveau/nouveau_drv.c
drivers/gpu/drm/r128/r128_drv.c
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/savage/savage_drv.c
drivers/gpu/drm/sis/sis_drv.c
drivers/gpu/drm/tdfx/tdfx_drv.c
drivers/gpu/drm/via/via_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/staging/gma500/psb_drv.c
include/drm/drmP.h