aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cafe_ccic.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:33 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commitfa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (patch)
tree64a6b20c6c6e19a731882f830bd70ca5c8d99943 /drivers/media/video/cafe_ccic.c
parent2b8693c0617e972fc0b2fd1ebf8de97e15b656c3 (diff)
[PATCH] mark struct file_operations const 4
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@sdl.org: dvb fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r--drivers/media/video/cafe_ccic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 3083c8075d13..fb1410c6f864 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -1715,7 +1715,7 @@ static void cafe_v4l_dev_release(struct video_device *vd)
1715 * clone it for specific real devices. 1715 * clone it for specific real devices.
1716 */ 1716 */
1717 1717
1718static struct file_operations cafe_v4l_fops = { 1718static const struct file_operations cafe_v4l_fops = {
1719 .owner = THIS_MODULE, 1719 .owner = THIS_MODULE,
1720 .open = cafe_v4l_open, 1720 .open = cafe_v4l_open,
1721 .release = cafe_v4l_release, 1721 .release = cafe_v4l_release,
@@ -1969,7 +1969,7 @@ static ssize_t cafe_dfs_read_regs(struct file *file,
1969 s - cafe_debug_buf); 1969 s - cafe_debug_buf);
1970} 1970}
1971 1971
1972static struct file_operations cafe_dfs_reg_ops = { 1972static const struct file_operations cafe_dfs_reg_ops = {
1973 .owner = THIS_MODULE, 1973 .owner = THIS_MODULE,
1974 .read = cafe_dfs_read_regs, 1974 .read = cafe_dfs_read_regs,
1975 .open = cafe_dfs_open 1975 .open = cafe_dfs_open
@@ -1995,7 +1995,7 @@ static ssize_t cafe_dfs_read_cam(struct file *file,
1995 s - cafe_debug_buf); 1995 s - cafe_debug_buf);
1996} 1996}
1997 1997
1998static struct file_operations cafe_dfs_cam_ops = { 1998static const struct file_operations cafe_dfs_cam_ops = {
1999 .owner = THIS_MODULE, 1999 .owner = THIS_MODULE,
2000 .read = cafe_dfs_read_cam, 2000 .read = cafe_dfs_read_cam,
2001 .open = cafe_dfs_open 2001 .open = cafe_dfs_open