From 00977a59b951207d38380c75f03a36829950265c Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:34 -0800 Subject: [PATCH] mark struct file_operations const 6 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. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/mbx/mbxdebugfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/video/mbx/mbxdebugfs.c') diff --git a/drivers/video/mbx/mbxdebugfs.c b/drivers/video/mbx/mbxdebugfs.c index 472a3ca3d92d..15b8b3c4330e 100644 --- a/drivers/video/mbx/mbxdebugfs.c +++ b/drivers/video/mbx/mbxdebugfs.c @@ -170,37 +170,37 @@ static ssize_t misc_read_file(struct file *file, char __user *userbuf, } -static struct file_operations sysconf_fops = { +static const struct file_operations sysconf_fops = { .read = sysconf_read_file, .write = write_file_dummy, .open = open_file_generic, }; -static struct file_operations clock_fops = { +static const struct file_operations clock_fops = { .read = clock_read_file, .write = write_file_dummy, .open = open_file_generic, }; -static struct file_operations display_fops = { +static const struct file_operations display_fops = { .read = display_read_file, .write = write_file_dummy, .open = open_file_generic, }; -static struct file_operations gsctl_fops = { +static const struct file_operations gsctl_fops = { .read = gsctl_read_file, .write = write_file_dummy, .open = open_file_generic, }; -static struct file_operations sdram_fops = { +static const struct file_operations sdram_fops = { .read = sdram_read_file, .write = write_file_dummy, .open = open_file_generic, }; -static struct file_operations misc_fops = { +static const struct file_operations misc_fops = { .read = misc_read_file, .write = write_file_dummy, .open = open_file_generic, -- cgit v1.2.2