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 /kernel/resource.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 'kernel/resource.c')
-rw-r--r-- | kernel/resource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 6de60c12143e..7b9a497419d9 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -88,7 +88,7 @@ static int r_show(struct seq_file *m, void *v) | |||
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | static struct seq_operations resource_op = { | 91 | static const struct seq_operations resource_op = { |
92 | .start = r_start, | 92 | .start = r_start, |
93 | .next = r_next, | 93 | .next = r_next, |
94 | .stop = r_stop, | 94 | .stop = r_stop, |
@@ -115,14 +115,14 @@ static int iomem_open(struct inode *inode, struct file *file) | |||
115 | return res; | 115 | return res; |
116 | } | 116 | } |
117 | 117 | ||
118 | static struct file_operations proc_ioports_operations = { | 118 | static const struct file_operations proc_ioports_operations = { |
119 | .open = ioports_open, | 119 | .open = ioports_open, |
120 | .read = seq_read, | 120 | .read = seq_read, |
121 | .llseek = seq_lseek, | 121 | .llseek = seq_lseek, |
122 | .release = seq_release, | 122 | .release = seq_release, |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static struct file_operations proc_iomem_operations = { | 125 | static const struct file_operations proc_iomem_operations = { |
126 | .open = iomem_open, | 126 | .open = iomem_open, |
127 | .read = seq_read, | 127 | .read = seq_read, |
128 | .llseek = seq_lseek, | 128 | .llseek = seq_lseek, |