aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-05-17 07:27:22 -0400
committerDave Airlie <airlied@redhat.com>2012-05-22 05:34:53 -0400
commit78b68556a964e74fb803b08c5b2d9c6ba3ec3787 (patch)
tree2147b191085b2fef211e0b8048bf658dab178479
parent3b02ab8893d45f17ae104588e337188127068a92 (diff)
drm: Constify gem_vm_ops pointer
The GEM vm operations structure is passed to the VM core that stores it in a const field. There vm operations structures can thus be const in DRM as well. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <rob.clark@linaro.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c2
-rw-r--r--drivers/gpu/drm/gma500/framebuffer.c2
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c2
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c2
-rw-r--r--drivers/gpu/drm/udl/udl_drv.c2
-rw-r--r--drivers/staging/omapdrm/omap_drv.c2
-rw-r--r--include/drm/drmP.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index a6819b5f8428..67a67b0839af 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -193,7 +193,7 @@ static void exynos_drm_lastclose(struct drm_device *dev)
193 exynos_drm_fbdev_restore_mode(dev); 193 exynos_drm_fbdev_restore_mode(dev);
194} 194}
195 195
196static struct vm_operations_struct exynos_drm_gem_vm_ops = { 196static const struct vm_operations_struct exynos_drm_gem_vm_ops = {
197 .fault = exynos_drm_gem_fault, 197 .fault = exynos_drm_gem_fault,
198 .open = drm_gem_vm_open, 198 .open = drm_gem_vm_open,
199 .close = drm_gem_vm_close, 199 .close = drm_gem_vm_close,
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 8d77224afc34..09cd23cc05a8 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -153,7 +153,7 @@ static void psbfb_vm_close(struct vm_area_struct *vma)
153{ 153{
154} 154}
155 155
156static struct vm_operations_struct psbfb_vm_ops = { 156static const struct vm_operations_struct psbfb_vm_ops = {
157 .fault = psbfb_vm_fault, 157 .fault = psbfb_vm_fault,
158 .open = psbfb_vm_open, 158 .open = psbfb_vm_open,
159 .close = psbfb_vm_close 159 .close = psbfb_vm_close
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 0c995ba0f2ec..caba6e08693c 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -595,7 +595,7 @@ static const struct dev_pm_ops psb_pm_ops = {
595 .runtime_idle = psb_runtime_idle, 595 .runtime_idle = psb_runtime_idle,
596}; 596};
597 597
598static struct vm_operations_struct psb_gem_vm_ops = { 598static const struct vm_operations_struct psb_gem_vm_ops = {
599 .fault = psb_gem_fault, 599 .fault = psb_gem_fault,
600 .open = drm_gem_vm_open, 600 .open = drm_gem_vm_open,
601 .close = drm_gem_vm_close, 601 .close = drm_gem_vm_close,
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index d3e194853061..7b967d5bf51d 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1012,7 +1012,7 @@ static const struct dev_pm_ops i915_pm_ops = {
1012 .restore = i915_pm_resume, 1012 .restore = i915_pm_resume,
1013}; 1013};
1014 1014
1015static struct vm_operations_struct i915_gem_vm_ops = { 1015static const struct vm_operations_struct i915_gem_vm_ops = {
1016 .fault = i915_gem_fault, 1016 .fault = i915_gem_fault,
1017 .open = drm_gem_vm_open, 1017 .open = drm_gem_vm_open,
1018 .close = drm_gem_vm_close, 1018 .close = drm_gem_vm_close,
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c
index 53673907a6a0..82e6921e6865 100644
--- a/drivers/gpu/drm/udl/udl_drv.c
+++ b/drivers/gpu/drm/udl/udl_drv.c
@@ -38,7 +38,7 @@ static void udl_usb_disconnect(struct usb_interface *interface)
38 drm_unplug_dev(dev); 38 drm_unplug_dev(dev);
39} 39}
40 40
41static struct vm_operations_struct udl_gem_vm_ops = { 41static const struct vm_operations_struct udl_gem_vm_ops = {
42 .fault = udl_gem_fault, 42 .fault = udl_gem_fault,
43 .open = drm_gem_vm_open, 43 .open = drm_gem_vm_open,
44 .close = drm_gem_vm_close, 44 .close = drm_gem_vm_close,
diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
index 620b8d54223d..071c7702d05d 100644
--- a/drivers/staging/omapdrm/omap_drv.c
+++ b/drivers/staging/omapdrm/omap_drv.c
@@ -726,7 +726,7 @@ static void dev_irq_uninstall(struct drm_device *dev)
726 DBG("irq_uninstall: dev=%p", dev); 726 DBG("irq_uninstall: dev=%p", dev);
727} 727}
728 728
729static struct vm_operations_struct omap_gem_vm_ops = { 729static const struct vm_operations_struct omap_gem_vm_ops = {
730 .fault = omap_gem_fault, 730 .fault = omap_gem_fault,
731 .open = drm_gem_vm_open, 731 .open = drm_gem_vm_open,
732 .close = drm_gem_vm_close, 732 .close = drm_gem_vm_close,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index e14a77c4e56b..15d91798dd31 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -941,7 +941,7 @@ struct drm_driver {
941 uint32_t handle); 941 uint32_t handle);
942 942
943 /* Driver private ops for this object */ 943 /* Driver private ops for this object */
944 struct vm_operations_struct *gem_vm_ops; 944 const struct vm_operations_struct *gem_vm_ops;
945 945
946 int major; 946 int major;
947 int minor; 947 int minor;