aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
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
commitd54b1fdb1d9f82e375a299e22bd366aad52d4c34 (patch)
treef94768d59702dbbc0beb9a70d9be65dbc5e5108d /drivers/net/wireless
parentfa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (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')
-rw-r--r--drivers/net/wireless/airo.c16
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c12
-rw-r--r--drivers/net/wireless/strip.c2
3 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 44a22701da97..b08055abe83a 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4430,53 +4430,53 @@ static int proc_BSSList_open( struct inode *inode, struct file *file );
4430static int proc_config_open( struct inode *inode, struct file *file ); 4430static int proc_config_open( struct inode *inode, struct file *file );
4431static int proc_wepkey_open( struct inode *inode, struct file *file ); 4431static int proc_wepkey_open( struct inode *inode, struct file *file );
4432 4432
4433static struct file_operations proc_statsdelta_ops = { 4433static const struct file_operations proc_statsdelta_ops = {
4434 .read = proc_read, 4434 .read = proc_read,
4435 .open = proc_statsdelta_open, 4435 .open = proc_statsdelta_open,
4436 .release = proc_close 4436 .release = proc_close
4437}; 4437};
4438 4438
4439static struct file_operations proc_stats_ops = { 4439static const struct file_operations proc_stats_ops = {
4440 .read = proc_read, 4440 .read = proc_read,
4441 .open = proc_stats_open, 4441 .open = proc_stats_open,
4442 .release = proc_close 4442 .release = proc_close
4443}; 4443};
4444 4444
4445static struct file_operations proc_status_ops = { 4445static const struct file_operations proc_status_ops = {
4446 .read = proc_read, 4446 .read = proc_read,
4447 .open = proc_status_open, 4447 .open = proc_status_open,
4448 .release = proc_close 4448 .release = proc_close
4449}; 4449};
4450 4450
4451static struct file_operations proc_SSID_ops = { 4451static const struct file_operations proc_SSID_ops = {
4452 .read = proc_read, 4452 .read = proc_read,
4453 .write = proc_write, 4453 .write = proc_write,
4454 .open = proc_SSID_open, 4454 .open = proc_SSID_open,
4455 .release = proc_close 4455 .release = proc_close
4456}; 4456};
4457 4457
4458static struct file_operations proc_BSSList_ops = { 4458static const struct file_operations proc_BSSList_ops = {
4459 .read = proc_read, 4459 .read = proc_read,
4460 .write = proc_write, 4460 .write = proc_write,
4461 .open = proc_BSSList_open, 4461 .open = proc_BSSList_open,
4462 .release = proc_close 4462 .release = proc_close
4463}; 4463};
4464 4464
4465static struct file_operations proc_APList_ops = { 4465static const struct file_operations proc_APList_ops = {
4466 .read = proc_read, 4466 .read = proc_read,
4467 .write = proc_write, 4467 .write = proc_write,
4468 .open = proc_APList_open, 4468 .open = proc_APList_open,
4469 .release = proc_close 4469 .release = proc_close
4470}; 4470};
4471 4471
4472static struct file_operations proc_config_ops = { 4472static const struct file_operations proc_config_ops = {
4473 .read = proc_read, 4473 .read = proc_read,
4474 .write = proc_write, 4474 .write = proc_write,
4475 .open = proc_config_open, 4475 .open = proc_config_open,
4476 .release = proc_close 4476 .release = proc_close
4477}; 4477};
4478 4478
4479static struct file_operations proc_wepkey_ops = { 4479static const struct file_operations proc_wepkey_ops = {
4480 .read = proc_read, 4480 .read = proc_read,
4481 .write = proc_write, 4481 .write = proc_write,
4482 .open = proc_wepkey_open, 4482 .open = proc_wepkey_open,
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
358static struct file_operations devinfo_fops = { 358static 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
364static struct file_operations spromdump_fops = { 364static 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
370static struct file_operations drvinfo_fops = { 370static 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
376static struct file_operations tsf_fops = { 376static 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
382static struct file_operations txstat_fops = { 382static 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
388static struct file_operations restart_fops = { 388static 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};
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index ce3a8bac66ff..f5ce1c6063d8 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -1160,7 +1160,7 @@ static int strip_seq_open(struct inode *inode, struct file *file)
1160 return seq_open(file, &strip_seq_ops); 1160 return seq_open(file, &strip_seq_ops);
1161} 1161}
1162 1162
1163static struct file_operations strip_seq_fops = { 1163static const struct file_operations strip_seq_fops = {
1164 .owner = THIS_MODULE, 1164 .owner = THIS_MODULE,
1165 .open = strip_seq_open, 1165 .open = strip_seq_open,
1166 .read = seq_read, 1166 .read = seq_read,