diff options
author | Helge Deller <deller@gmx.de> | 2006-12-06 23:40:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:46 -0500 |
commit | 15ad7cdcfd76450d4beebc789ec646664238184d (patch) | |
tree | 279d05a76ae0906c23ee2de8c5684d95d9886ad3 /mm/swapfile.c | |
parent | 4a08a9f68168e547c2baf100020e9b96cae5fbd1 (diff) |
[PATCH] struct seq_operations and struct file_operations constification
- move some file_operations structs into the .rodata section
- move static strings from policy_types[] array into the .rodata section
- fix generic seq_operations usages, so that those structs may be defined
as "const" as well
[akpm@osdl.org: couple of fixes]
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 55242363de64..c5431072f422 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1368,7 +1368,7 @@ static int swap_show(struct seq_file *swap, void *v) | |||
1368 | return 0; | 1368 | return 0; |
1369 | } | 1369 | } |
1370 | 1370 | ||
1371 | static struct seq_operations swaps_op = { | 1371 | static const struct seq_operations swaps_op = { |
1372 | .start = swap_start, | 1372 | .start = swap_start, |
1373 | .next = swap_next, | 1373 | .next = swap_next, |
1374 | .stop = swap_stop, | 1374 | .stop = swap_stop, |
@@ -1380,7 +1380,7 @@ static int swaps_open(struct inode *inode, struct file *file) | |||
1380 | return seq_open(file, &swaps_op); | 1380 | return seq_open(file, &swaps_op); |
1381 | } | 1381 | } |
1382 | 1382 | ||
1383 | static struct file_operations proc_swaps_operations = { | 1383 | static const struct file_operations proc_swaps_operations = { |
1384 | .open = swaps_open, | 1384 | .open = swaps_open, |
1385 | .read = seq_read, | 1385 | .read = seq_read, |
1386 | .llseek = seq_lseek, | 1386 | .llseek = seq_lseek, |