aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/mbx/mbxdebugfs.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commit00977a59b951207d38380c75f03a36829950265c (patch)
tree26933feafebffca95df02c19df03f5e56aada47e /drivers/video/mbx/mbxdebugfs.c
parentd54b1fdb1d9f82e375a299e22bd366aad52d4c34 (diff)
[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 <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/video/mbx/mbxdebugfs.c')
-rw-r--r--drivers/video/mbx/mbxdebugfs.c12
1 files changed, 6 insertions, 6 deletions
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,
170} 170}
171 171
172 172
173static struct file_operations sysconf_fops = { 173static const struct file_operations sysconf_fops = {
174 .read = sysconf_read_file, 174 .read = sysconf_read_file,
175 .write = write_file_dummy, 175 .write = write_file_dummy,
176 .open = open_file_generic, 176 .open = open_file_generic,
177}; 177};
178 178
179static struct file_operations clock_fops = { 179static const struct file_operations clock_fops = {
180 .read = clock_read_file, 180 .read = clock_read_file,
181 .write = write_file_dummy, 181 .write = write_file_dummy,
182 .open = open_file_generic, 182 .open = open_file_generic,
183}; 183};
184 184
185static struct file_operations display_fops = { 185static const struct file_operations display_fops = {
186 .read = display_read_file, 186 .read = display_read_file,
187 .write = write_file_dummy, 187 .write = write_file_dummy,
188 .open = open_file_generic, 188 .open = open_file_generic,
189}; 189};
190 190
191static struct file_operations gsctl_fops = { 191static const struct file_operations gsctl_fops = {
192 .read = gsctl_read_file, 192 .read = gsctl_read_file,
193 .write = write_file_dummy, 193 .write = write_file_dummy,
194 .open = open_file_generic, 194 .open = open_file_generic,
195}; 195};
196 196
197static struct file_operations sdram_fops = { 197static const struct file_operations sdram_fops = {
198 .read = sdram_read_file, 198 .read = sdram_read_file,
199 .write = write_file_dummy, 199 .write = write_file_dummy,
200 .open = open_file_generic, 200 .open = open_file_generic,
201}; 201};
202 202
203static struct file_operations misc_fops = { 203static const struct file_operations misc_fops = {
204 .read = misc_read_file, 204 .read = misc_read_file,
205 .write = write_file_dummy, 205 .write = write_file_dummy,
206 .open = open_file_generic, 206 .open = open_file_generic,