drm: Make the per-driver file_operations struct const
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_drv.c
index cc531bb59c26f7ccc8b7de8721f1b94bce576be6..9f592703c3696842d8a858de06bec880cd832a65 100644 (file)
@@ -788,6 +788,21 @@ static struct vm_operations_struct i915_gem_vm_ops = {
        .close = drm_gem_vm_close,
 };
 
+static const struct file_operations i915_driver_fops = {
+       .owner = THIS_MODULE,
+       .open = drm_open,
+       .release = drm_release,
+       .unlocked_ioctl = drm_ioctl,
+       .mmap = drm_gem_mmap,
+       .poll = drm_poll,
+       .fasync = drm_fasync,
+       .read = drm_read,
+#ifdef CONFIG_COMPAT
+       .compat_ioctl = i915_compat_ioctl,
+#endif
+       .llseek = noop_llseek,
+};
+
 static struct drm_driver driver = {
        /* don't use mtrr's here, the Xserver or user space app should
         * deal with them for intel hardware.
@@ -821,21 +836,7 @@ static struct drm_driver driver = {
        .dumb_map_offset = i915_gem_mmap_gtt,
        .dumb_destroy = i915_gem_dumb_destroy,
        .ioctls = i915_ioctls,
-       .fops = {
-                .owner = THIS_MODULE,
-                .open = drm_open,
-                .release = drm_release,
-                .unlocked_ioctl = drm_ioctl,
-                .mmap = drm_gem_mmap,
-                .poll = drm_poll,
-                .fasync = drm_fasync,
-                .read = drm_read,
-#ifdef CONFIG_COMPAT
-                .compat_ioctl = i915_compat_ioctl,
-#endif
-                .llseek = noop_llseek,
-       },
-
+       .fops = &i915_driver_fops,
        .name = DRIVER_NAME,
        .desc = DRIVER_DESC,
        .date = DRIVER_DATE,
This page took 0.030855 seconds and 5 git commands to generate.