diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:45 -0500 |
commit | d54b1fdb1d9f82e375a299e22bd366aad52d4c34 (patch) | |
tree | f94768d59702dbbc0beb9a70d9be65dbc5e5108d /drivers/net/wireless/bcm43xx | |
parent | fa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (diff) |
[PATCH] mark struct file_operations const 5
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/net/wireless/bcm43xx')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c index b9df06a06ea9..35dbe4554513 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | |||
@@ -355,37 +355,37 @@ out_up: | |||
355 | #undef fappend | 355 | #undef fappend |
356 | 356 | ||
357 | 357 | ||
358 | static struct file_operations devinfo_fops = { | 358 | static const struct file_operations devinfo_fops = { |
359 | .read = devinfo_read_file, | 359 | .read = devinfo_read_file, |
360 | .write = write_file_dummy, | 360 | .write = write_file_dummy, |
361 | .open = open_file_generic, | 361 | .open = open_file_generic, |
362 | }; | 362 | }; |
363 | 363 | ||
364 | static struct file_operations spromdump_fops = { | 364 | static const struct file_operations spromdump_fops = { |
365 | .read = spromdump_read_file, | 365 | .read = spromdump_read_file, |
366 | .write = write_file_dummy, | 366 | .write = write_file_dummy, |
367 | .open = open_file_generic, | 367 | .open = open_file_generic, |
368 | }; | 368 | }; |
369 | 369 | ||
370 | static struct file_operations drvinfo_fops = { | 370 | static const struct file_operations drvinfo_fops = { |
371 | .read = drvinfo_read_file, | 371 | .read = drvinfo_read_file, |
372 | .write = write_file_dummy, | 372 | .write = write_file_dummy, |
373 | .open = open_file_generic, | 373 | .open = open_file_generic, |
374 | }; | 374 | }; |
375 | 375 | ||
376 | static struct file_operations tsf_fops = { | 376 | static const struct file_operations tsf_fops = { |
377 | .read = tsf_read_file, | 377 | .read = tsf_read_file, |
378 | .write = tsf_write_file, | 378 | .write = tsf_write_file, |
379 | .open = open_file_generic, | 379 | .open = open_file_generic, |
380 | }; | 380 | }; |
381 | 381 | ||
382 | static struct file_operations txstat_fops = { | 382 | static const struct file_operations txstat_fops = { |
383 | .read = txstat_read_file, | 383 | .read = txstat_read_file, |
384 | .write = write_file_dummy, | 384 | .write = write_file_dummy, |
385 | .open = open_file_generic, | 385 | .open = open_file_generic, |
386 | }; | 386 | }; |
387 | 387 | ||
388 | static struct file_operations restart_fops = { | 388 | static const struct file_operations restart_fops = { |
389 | .write = restart_write_file, | 389 | .write = restart_write_file, |
390 | .open = open_file_generic, | 390 | .open = open_file_generic, |
391 | }; | 391 | }; |