Commit f0f37e2f authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

const: mark struct vm_struct_operations

* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6f507102
...@@ -69,11 +69,11 @@ ia32_install_gate_page (struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -69,11 +69,11 @@ ia32_install_gate_page (struct vm_area_struct *vma, struct vm_fault *vmf)
} }
static struct vm_operations_struct ia32_shared_page_vm_ops = { static const struct vm_operations_struct ia32_shared_page_vm_ops = {
.fault = ia32_install_shared_page .fault = ia32_install_shared_page
}; };
static struct vm_operations_struct ia32_gate_page_vm_ops = { static const struct vm_operations_struct ia32_gate_page_vm_ops = {
.fault = ia32_install_gate_page .fault = ia32_install_gate_page
}; };
......
...@@ -309,7 +309,7 @@ static int spufs_mem_mmap_access(struct vm_area_struct *vma, ...@@ -309,7 +309,7 @@ static int spufs_mem_mmap_access(struct vm_area_struct *vma,
return len; return len;
} }
static struct vm_operations_struct spufs_mem_mmap_vmops = { static const struct vm_operations_struct spufs_mem_mmap_vmops = {
.fault = spufs_mem_mmap_fault, .fault = spufs_mem_mmap_fault,
.access = spufs_mem_mmap_access, .access = spufs_mem_mmap_access,
}; };
...@@ -436,7 +436,7 @@ static int spufs_cntl_mmap_fault(struct vm_area_struct *vma, ...@@ -436,7 +436,7 @@ static int spufs_cntl_mmap_fault(struct vm_area_struct *vma,
return spufs_ps_fault(vma, vmf, 0x4000, SPUFS_CNTL_MAP_SIZE); return spufs_ps_fault(vma, vmf, 0x4000, SPUFS_CNTL_MAP_SIZE);
} }
static struct vm_operations_struct spufs_cntl_mmap_vmops = { static const struct vm_operations_struct spufs_cntl_mmap_vmops = {
.fault = spufs_cntl_mmap_fault, .fault = spufs_cntl_mmap_fault,
}; };
...@@ -1143,7 +1143,7 @@ spufs_signal1_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -1143,7 +1143,7 @@ spufs_signal1_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
#endif #endif
} }
static struct vm_operations_struct spufs_signal1_mmap_vmops = { static const struct vm_operations_struct spufs_signal1_mmap_vmops = {
.fault = spufs_signal1_mmap_fault, .fault = spufs_signal1_mmap_fault,
}; };
...@@ -1279,7 +1279,7 @@ spufs_signal2_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -1279,7 +1279,7 @@ spufs_signal2_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
#endif #endif
} }
static struct vm_operations_struct spufs_signal2_mmap_vmops = { static const struct vm_operations_struct spufs_signal2_mmap_vmops = {
.fault = spufs_signal2_mmap_fault, .fault = spufs_signal2_mmap_fault,
}; };
...@@ -1397,7 +1397,7 @@ spufs_mss_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -1397,7 +1397,7 @@ spufs_mss_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_MSS_MAP_SIZE); return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_MSS_MAP_SIZE);
} }
static struct vm_operations_struct spufs_mss_mmap_vmops = { static const struct vm_operations_struct spufs_mss_mmap_vmops = {
.fault = spufs_mss_mmap_fault, .fault = spufs_mss_mmap_fault,
}; };
...@@ -1458,7 +1458,7 @@ spufs_psmap_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -1458,7 +1458,7 @@ spufs_psmap_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_PS_MAP_SIZE); return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_PS_MAP_SIZE);
} }
static struct vm_operations_struct spufs_psmap_mmap_vmops = { static const struct vm_operations_struct spufs_psmap_mmap_vmops = {
.fault = spufs_psmap_mmap_fault, .fault = spufs_psmap_mmap_fault,
}; };
...@@ -1517,7 +1517,7 @@ spufs_mfc_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -1517,7 +1517,7 @@ spufs_mfc_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return spufs_ps_fault(vma, vmf, 0x3000, SPUFS_MFC_MAP_SIZE); return spufs_ps_fault(vma, vmf, 0x3000, SPUFS_MFC_MAP_SIZE);
} }
static struct vm_operations_struct spufs_mfc_mmap_vmops = { static const struct vm_operations_struct spufs_mfc_mmap_vmops = {
.fault = spufs_mfc_mmap_fault, .fault = spufs_mfc_mmap_fault,
}; };
......
...@@ -266,7 +266,7 @@ void pcibios_set_master(struct pci_dev *dev) ...@@ -266,7 +266,7 @@ void pcibios_set_master(struct pci_dev *dev)
pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
} }
static struct vm_operations_struct pci_mmap_ops = { static const struct vm_operations_struct pci_mmap_ops = {
.access = generic_access_phys, .access = generic_access_phys,
}; };
......
...@@ -131,7 +131,7 @@ struct agp_bridge_driver { ...@@ -131,7 +131,7 @@ struct agp_bridge_driver {
struct agp_bridge_data { struct agp_bridge_data {
const struct agp_version *version; const struct agp_version *version;
const struct agp_bridge_driver *driver; const struct agp_bridge_driver *driver;
struct vm_operations_struct *vm_ops; const struct vm_operations_struct *vm_ops;
void *previous_size; void *previous_size;
void *current_size; void *current_size;
void *dev_private_data; void *dev_private_data;
......
...@@ -40,7 +40,7 @@ static struct aper_size_info_fixed alpha_core_agp_sizes[] = ...@@ -40,7 +40,7 @@ static struct aper_size_info_fixed alpha_core_agp_sizes[] =
{ 0, 0, 0 }, /* filled in by alpha_core_agp_setup */ { 0, 0, 0 }, /* filled in by alpha_core_agp_setup */
}; };
struct vm_operations_struct alpha_core_agp_vm_ops = { static const struct vm_operations_struct alpha_core_agp_vm_ops = {
.fault = alpha_core_agp_vm_fault, .fault = alpha_core_agp_vm_fault,
}; };
......
...@@ -301,7 +301,7 @@ static inline int private_mapping_ok(struct vm_area_struct *vma) ...@@ -301,7 +301,7 @@ static inline int private_mapping_ok(struct vm_area_struct *vma)
} }
#endif #endif
static struct vm_operations_struct mmap_mem_ops = { static const struct vm_operations_struct mmap_mem_ops = {
#ifdef CONFIG_HAVE_IOREMAP_PROT #ifdef CONFIG_HAVE_IOREMAP_PROT
.access = generic_access_phys .access = generic_access_phys
#endif #endif
......
...@@ -239,7 +239,7 @@ mspec_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -239,7 +239,7 @@ mspec_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return VM_FAULT_NOPAGE; return VM_FAULT_NOPAGE;
} }
static struct vm_operations_struct mspec_vm_ops = { static const struct vm_operations_struct mspec_vm_ops = {
.open = mspec_open, .open = mspec_open,
.close = mspec_close, .close = mspec_close,
.fault = mspec_fault, .fault = mspec_fault,
......
...@@ -369,28 +369,28 @@ static int drm_vm_sg_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -369,28 +369,28 @@ static int drm_vm_sg_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
} }
/** AGP virtual memory operations */ /** AGP virtual memory operations */
static struct vm_operations_struct drm_vm_ops = { static const struct vm_operations_struct drm_vm_ops = {
.fault = drm_vm_fault, .fault = drm_vm_fault,
.open = drm_vm_open, .open = drm_vm_open,
.close = drm_vm_close, .close = drm_vm_close,
}; };
/** Shared virtual memory operations */ /** Shared virtual memory operations */
static struct vm_operations_struct drm_vm_shm_ops = { static const struct vm_operations_struct drm_vm_shm_ops = {
.fault = drm_vm_shm_fault, .fault = drm_vm_shm_fault,
.open = drm_vm_open, .open = drm_vm_open,
.close = drm_vm_shm_close, .close = drm_vm_shm_close,
}; };
/** DMA virtual memory operations */ /** DMA virtual memory operations */
static struct vm_operations_struct drm_vm_dma_ops = { static const struct vm_operations_struct drm_vm_dma_ops = {
.fault = drm_vm_dma_fault, .fault = drm_vm_dma_fault,
.open = drm_vm_open, .open = drm_vm_open,
.close = drm_vm_close, .close = drm_vm_close,
}; };
/** Scatter-gather virtual memory operations */ /** Scatter-gather virtual memory operations */
static struct vm_operations_struct drm_vm_sg_ops = { static const struct vm_operations_struct drm_vm_sg_ops = {
.fault = drm_vm_sg_fault, .fault = drm_vm_sg_fault,
.open = drm_vm_open, .open = drm_vm_open,
.close = drm_vm_close, .close = drm_vm_close,
......
...@@ -530,7 +530,7 @@ void radeon_ttm_fini(struct radeon_device *rdev) ...@@ -530,7 +530,7 @@ void radeon_ttm_fini(struct radeon_device *rdev)
} }
static struct vm_operations_struct radeon_ttm_vm_ops; static struct vm_operations_struct radeon_ttm_vm_ops;
static struct vm_operations_struct *ttm_vm_ops = NULL; static const struct vm_operations_struct *ttm_vm_ops = NULL;
static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{ {
......
...@@ -228,7 +228,7 @@ static void ttm_bo_vm_close(struct vm_area_struct *vma) ...@@ -228,7 +228,7 @@ static void ttm_bo_vm_close(struct vm_area_struct *vma)
vma->vm_private_data = NULL; vma->vm_private_data = NULL;
} }
static struct vm_operations_struct ttm_bo_vm_ops = { static const struct vm_operations_struct ttm_bo_vm_ops = {
.fault = ttm_bo_vm_fault, .fault = ttm_bo_vm_fault,
.open = ttm_bo_vm_open, .open = ttm_bo_vm_open,
.close = ttm_bo_vm_close .close = ttm_bo_vm_close
......
...@@ -247,7 +247,7 @@ static int dma_region_pagefault(struct vm_area_struct *vma, ...@@ -247,7 +247,7 @@ static int dma_region_pagefault(struct vm_area_struct *vma,
return 0; return 0;
} }
static struct vm_operations_struct dma_region_vm_ops = { static const struct vm_operations_struct dma_region_vm_ops = {
.fault = dma_region_pagefault, .fault = dma_region_pagefault,
}; };
......
...@@ -95,7 +95,7 @@ static void ehca_mm_close(struct vm_area_struct *vma) ...@@ -95,7 +95,7 @@ static void ehca_mm_close(struct vm_area_struct *vma)
vma->vm_start, vma->vm_end, *count); vma->vm_start, vma->vm_end, *count);
} }
static struct vm_operations_struct vm_ops = { static const struct vm_operations_struct vm_ops = {
.open = ehca_mm_open, .open = ehca_mm_open,
.close = ehca_mm_close, .close = ehca_mm_close,
}; };
......
...@@ -1151,7 +1151,7 @@ static int ipath_file_vma_fault(struct vm_area_struct *vma, ...@@ -1151,7 +1151,7 @@ static int ipath_file_vma_fault(struct vm_area_struct *vma,
return 0; return 0;
} }
static struct vm_operations_struct ipath_file_vm_ops = { static const struct vm_operations_struct ipath_file_vm_ops = {
.fault = ipath_file_vma_fault, .fault = ipath_file_vma_fault,
}; };
......
...@@ -74,7 +74,7 @@ static void ipath_vma_close(struct vm_area_struct *vma) ...@@ -74,7 +74,7 @@ static void ipath_vma_close(struct vm_area_struct *vma)
kref_put(&ip->ref, ipath_release_mmap_info); kref_put(&ip->ref, ipath_release_mmap_info);
} }
static struct vm_operations_struct ipath_vm_ops = { static const struct vm_operations_struct ipath_vm_ops = {
.open = ipath_vma_open, .open = ipath_vma_open,
.close = ipath_vma_close, .close = ipath_vma_close,
}; };
......
...@@ -1325,7 +1325,7 @@ static void cafe_v4l_vm_close(struct vm_area_struct *vma) ...@@ -1325,7 +1325,7 @@ static void cafe_v4l_vm_close(struct vm_area_struct *vma)
mutex_unlock(&sbuf->cam->s_mutex); mutex_unlock(&sbuf->cam->s_mutex);
} }
static struct vm_operations_struct cafe_v4l_vm_ops = { static const struct vm_operations_struct cafe_v4l_vm_ops = {
.open = cafe_v4l_vm_open, .open = cafe_v4l_vm_open,
.close = cafe_v4l_vm_close .close = cafe_v4l_vm_close
}; };
......
...@@ -1496,7 +1496,7 @@ static void et61x251_vm_close(struct vm_area_struct* vma) ...@@ -1496,7 +1496,7 @@ static void et61x251_vm_close(struct vm_area_struct* vma)
} }
static struct vm_operations_struct et61x251_vm_ops = { static const struct vm_operations_struct et61x251_vm_ops = {
.open = et61x251_vm_open, .open = et61x251_vm_open,
.close = et61x251_vm_close, .close = et61x251_vm_close,
}; };
......
...@@ -99,7 +99,7 @@ static void gspca_vm_close(struct vm_area_struct *vma) ...@@ -99,7 +99,7 @@ static void gspca_vm_close(struct vm_area_struct *vma)
frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED; frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED;
} }
static struct vm_operations_struct gspca_vm_ops = { static const struct vm_operations_struct gspca_vm_ops = {
.open = gspca_vm_open, .open = gspca_vm_open,
.close = gspca_vm_close, .close = gspca_vm_close,
}; };
......
...@@ -1589,7 +1589,7 @@ static void meye_vm_close(struct vm_area_struct *vma) ...@@ -1589,7 +1589,7 @@ static void meye_vm_close(struct vm_area_struct *vma)
meye.vma_use_count[idx]--; meye.vma_use_count[idx]--;
} }
static struct vm_operations_struct meye_vm_ops = { static const struct vm_operations_struct meye_vm_ops = {
.open = meye_vm_open, .open = meye_vm_open,
.close = meye_vm_close, .close = meye_vm_close,
}; };
......
...@@ -2077,7 +2077,7 @@ static void sn9c102_vm_close(struct vm_area_struct* vma) ...@@ -2077,7 +2077,7 @@ static void sn9c102_vm_close(struct vm_area_struct* vma)
} }
static struct vm_operations_struct sn9c102_vm_ops = { static const struct vm_operations_struct sn9c102_vm_ops = {
.open = sn9c102_vm_open, .open = sn9c102_vm_open,
.close = sn9c102_vm_close, .close = sn9c102_vm_close,
}; };
......
...@@ -790,7 +790,7 @@ static void stk_v4l_vm_close(struct vm_area_struct *vma) ...@@ -790,7 +790,7 @@ static void stk_v4l_vm_close(struct vm_area_struct *vma)
if (sbuf->mapcount == 0) if (sbuf->mapcount == 0)
sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED; sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED;
} }
static struct vm_operations_struct stk_v4l_vm_ops = { static const struct vm_operations_struct stk_v4l_vm_ops = {
.open = stk_v4l_vm_open, .open = stk_v4l_vm_open,
.close = stk_v4l_vm_close .close = stk_v4l_vm_close
}; };
......
...@@ -1069,7 +1069,7 @@ static void uvc_vm_close(struct vm_area_struct *vma) ...@@ -1069,7 +1069,7 @@ static void uvc_vm_close(struct vm_area_struct *vma)
buffer->vma_use_count--; buffer->vma_use_count--;
} }
static struct vm_operations_struct uvc_vm_ops = { static const struct vm_operations_struct uvc_vm_ops = {
.open = uvc_vm_open, .open = uvc_vm_open,
.close = uvc_vm_close, .close = uvc_vm_close,
}; };
......
...@@ -105,7 +105,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma) ...@@ -105,7 +105,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
} }
} }
static struct vm_operations_struct videobuf_vm_ops = { static const struct vm_operations_struct videobuf_vm_ops = {
.open = videobuf_vm_open, .open = videobuf_vm_open,
.close = videobuf_vm_close, .close = videobuf_vm_close,
}; };
......
...@@ -394,7 +394,7 @@ videobuf_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -394,7 +394,7 @@ videobuf_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return 0; return 0;
} }
static struct vm_operations_struct videobuf_vm_ops = static const struct vm_operations_struct videobuf_vm_ops =
{ {
.open = videobuf_vm_open, .open = videobuf_vm_open,
.close = videobuf_vm_close, .close = videobuf_vm_close,
......
...@@ -116,7 +116,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma) ...@@ -116,7 +116,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
return; return;
} }
static struct vm_operations_struct videobuf_vm_ops = static const struct vm_operations_struct videobuf_vm_ops =
{ {
.open = videobuf_vm_open, .open = videobuf_vm_open,
.close = videobuf_vm_close, .close = videobuf_vm_close,
......
...@@ -3857,7 +3857,7 @@ static void vino_vm_close(struct vm_area_struct *vma) ...@@ -3857,7 +3857,7 @@ static void vino_vm_close(struct vm_area_struct *vma)
dprintk("vino_vm_close(): count = %d\n", fb->map_count); dprintk("vino_vm_close(): count = %d\n", fb->map_count);
} }
static struct vm_operations_struct vino_vm_ops = { static const struct vm_operations_struct vino_vm_ops = {
.open = vino_vm_open, .open = vino_vm_open,
.close = vino_vm_close, .close = vino_vm_close,
}; };
......
...@@ -935,7 +935,7 @@ static void zc0301_vm_close(struct vm_area_struct* vma) ...@@ -935,7 +935,7 @@ static void zc0301_vm_close(struct vm_area_struct* vma)
} }
static struct vm_operations_struct zc0301_vm_ops = { static const struct vm_operations_struct zc0301_vm_ops = {
.open = zc0301_vm_open, .open = zc0301_vm_open,
.close = zc0301_vm_close, .close = zc0301_vm_close,
}; };
......
...@@ -3172,7 +3172,7 @@ zoran_vm_close (struct vm_area_struct *vma) ...@@ -3172,7 +3172,7 @@ zoran_vm_close (struct vm_area_struct *vma)
mutex_unlock(&zr->resource_lock); mutex_unlock(&zr->resource_lock);
} }
static struct vm_operations_struct zoran_vm_ops = { static const struct vm_operations_struct zoran_vm_ops = {
.open = zoran_vm_open, .open = zoran_vm_open,
.close = zoran_vm_close, .close = zoran_vm_close,
}; };
......
...@@ -438,7 +438,7 @@ static struct miscdevice gru_miscdev = { ...@@ -438,7 +438,7 @@ static struct miscdevice gru_miscdev = {
.fops = &gru_fops, .fops = &gru_fops,
}; };
struct vm_operations_struct gru_vm_ops = { const struct vm_operations_struct gru_vm_ops = {
.close = gru_vma_close, .close = gru_vma_close,
.fault = gru_fault, .fault = gru_fault,
}; };
......
...@@ -624,7 +624,7 @@ static inline int is_kernel_context(struct gru_thread_state *gts) ...@@ -624,7 +624,7 @@ static inline int is_kernel_context(struct gru_thread_state *gts)
*/ */
struct gru_unload_context_req; struct gru_unload_context_req;
extern struct vm_operations_struct gru_vm_ops; extern const struct vm_operations_struct gru_vm_ops;
extern struct device *grudev; extern struct device *grudev;
extern struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma, extern struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma,
......
...@@ -1185,7 +1185,7 @@ sg_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -1185,7 +1185,7 @@ sg_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
static struct vm_operations_struct sg_mmap_vm_ops = { static const struct vm_operations_struct sg_mmap_vm_ops = {
.fault = sg_vma_fault, .fault = sg_vma_fault,
}; };
......
...@@ -658,7 +658,7 @@ static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -658,7 +658,7 @@ static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return 0; return 0;
} }
static struct vm_operations_struct uio_vm_ops = { static const struct vm_operations_struct uio_vm_ops = {
.open = uio_vma_open, .open = uio_vma_open,
.close = uio_vma_close, .close = uio_vma_close,
.fault = uio_vma_fault, .fault = uio_vma_fault,
......
...@@ -1174,7 +1174,7 @@ static int mon_bin_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -1174,7 +1174,7 @@ static int mon_bin_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return 0; return 0;
} }
static struct vm_operations_struct mon_bin_vm_ops = { static const struct vm_operations_struct mon_bin_vm_ops = {
.open = mon_bin_vma_open, .open = mon_bin_vma_open,
.close = mon_bin_vma_close, .close = mon_bin_vma_close,
.fault = mon_bin_vma_fault, .fault = mon_bin_vma_fault,
......
...@@ -125,7 +125,7 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma, ...@@ -125,7 +125,7 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
return 0; return 0;
} }
static struct vm_operations_struct fb_deferred_io_vm_ops = { static const struct vm_operations_struct fb_deferred_io_vm_ops = {
.fault = fb_deferred_io_fault, .fault = fb_deferred_io_fault,
.page_mkwrite = fb_deferred_io_mkwrite, .page_mkwrite = fb_deferred_io_mkwrite,
}; };
......
...@@ -1035,7 +1035,7 @@ static void mmap_user_close(struct vm_area_struct *vma) ...@@ -1035,7 +1035,7 @@ static void mmap_user_close(struct vm_area_struct *vma)
atomic_dec(&dispc.map_count[plane]); atomic_dec(&dispc.map_count[plane]);
} }
static struct vm_operations_struct mmap_user_ops = { static const struct vm_operations_struct mmap_user_ops = {
.open = mmap_user_open, .open = mmap_user_open,
.close = mmap_user_close, .close = mmap_user_close,
}; };
......
...@@ -1184,7 +1184,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) ...@@ -1184,7 +1184,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
return ret > 0 ? EIO : ret; return ret > 0 ? EIO : ret;
} }