aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2008-02-08 07:21:19 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:38 -0500
commit03a44825be987d720df854f63b2f7bd30e46bdde (patch)
tree6ac01a425ff2201db972fd3b836efc9b0ab6eaec /fs/proc/proc_misc.c
parentec26e11740cdff8c3c8330ea235478704ffb4a71 (diff)
procfs: constify function pointer tables
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-By: David Howells <dhowells@redhat.com> Acked-by: Bryan Wu <bryan.wu@analog.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 2686592dbcb2..468805d40e2b 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -222,7 +222,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
222#undef K 222#undef K
223} 223}
224 224
225extern struct seq_operations fragmentation_op; 225extern const struct seq_operations fragmentation_op;
226static int fragmentation_open(struct inode *inode, struct file *file) 226static int fragmentation_open(struct inode *inode, struct file *file)
227{ 227{
228 (void)inode; 228 (void)inode;
@@ -236,7 +236,7 @@ static const struct file_operations fragmentation_file_operations = {
236 .release = seq_release, 236 .release = seq_release,
237}; 237};
238 238
239extern struct seq_operations pagetypeinfo_op; 239extern const struct seq_operations pagetypeinfo_op;
240static int pagetypeinfo_open(struct inode *inode, struct file *file) 240static int pagetypeinfo_open(struct inode *inode, struct file *file)
241{ 241{
242 return seq_open(file, &pagetypeinfo_op); 242 return seq_open(file, &pagetypeinfo_op);
@@ -249,7 +249,7 @@ static const struct file_operations pagetypeinfo_file_ops = {
249 .release = seq_release, 249 .release = seq_release,
250}; 250};
251 251
252extern struct seq_operations zoneinfo_op; 252extern const struct seq_operations zoneinfo_op;
253static int zoneinfo_open(struct inode *inode, struct file *file) 253static int zoneinfo_open(struct inode *inode, struct file *file)
254{ 254{
255 return seq_open(file, &zoneinfo_op); 255 return seq_open(file, &zoneinfo_op);
@@ -274,7 +274,7 @@ static int version_read_proc(char *page, char **start, off_t off,
274 return proc_calc_metrics(page, start, off, count, eof, len); 274 return proc_calc_metrics(page, start, off, count, eof, len);
275} 275}
276 276
277extern struct seq_operations cpuinfo_op; 277extern const struct seq_operations cpuinfo_op;
278static int cpuinfo_open(struct inode *inode, struct file *file) 278static int cpuinfo_open(struct inode *inode, struct file *file)
279{ 279{
280 return seq_open(file, &cpuinfo_op); 280 return seq_open(file, &cpuinfo_op);
@@ -327,7 +327,7 @@ static void devinfo_stop(struct seq_file *f, void *v)
327 /* Nothing to do */ 327 /* Nothing to do */
328} 328}
329 329
330static struct seq_operations devinfo_ops = { 330static const struct seq_operations devinfo_ops = {
331 .start = devinfo_start, 331 .start = devinfo_start,
332 .next = devinfo_next, 332 .next = devinfo_next,
333 .stop = devinfo_stop, 333 .stop = devinfo_stop,
@@ -346,7 +346,7 @@ static const struct file_operations proc_devinfo_operations = {
346 .release = seq_release, 346 .release = seq_release,
347}; 347};
348 348
349extern struct seq_operations vmstat_op; 349extern const struct seq_operations vmstat_op;
350static int vmstat_open(struct inode *inode, struct file *file) 350static int vmstat_open(struct inode *inode, struct file *file)
351{ 351{
352 return seq_open(file, &vmstat_op); 352 return seq_open(file, &vmstat_op);
@@ -377,7 +377,7 @@ static int stram_read_proc(char *page, char **start, off_t off,
377#endif 377#endif
378 378
379#ifdef CONFIG_BLOCK 379#ifdef CONFIG_BLOCK
380extern struct seq_operations partitions_op; 380extern const struct seq_operations partitions_op;
381static int partitions_open(struct inode *inode, struct file *file) 381static int partitions_open(struct inode *inode, struct file *file)
382{ 382{
383 return seq_open(file, &partitions_op); 383 return seq_open(file, &partitions_op);
@@ -389,7 +389,7 @@ static const struct file_operations proc_partitions_operations = {
389 .release = seq_release, 389 .release = seq_release,
390}; 390};
391 391
392extern struct seq_operations diskstats_op; 392extern const struct seq_operations diskstats_op;
393static int diskstats_open(struct inode *inode, struct file *file) 393static int diskstats_open(struct inode *inode, struct file *file)
394{ 394{
395 return seq_open(file, &diskstats_op); 395 return seq_open(file, &diskstats_op);
@@ -403,7 +403,7 @@ static const struct file_operations proc_diskstats_operations = {
403#endif 403#endif
404 404
405#ifdef CONFIG_MODULES 405#ifdef CONFIG_MODULES
406extern struct seq_operations modules_op; 406extern const struct seq_operations modules_op;
407static int modules_open(struct inode *inode, struct file *file) 407static int modules_open(struct inode *inode, struct file *file)
408{ 408{
409 return seq_open(file, &modules_op); 409 return seq_open(file, &modules_op);
@@ -430,7 +430,7 @@ static const struct file_operations proc_slabinfo_operations = {
430}; 430};
431 431
432#ifdef CONFIG_DEBUG_SLAB_LEAK 432#ifdef CONFIG_DEBUG_SLAB_LEAK
433extern struct seq_operations slabstats_op; 433extern const struct seq_operations slabstats_op;
434static int slabstats_open(struct inode *inode, struct file *file) 434static int slabstats_open(struct inode *inode, struct file *file)
435{ 435{
436 unsigned long *n = kzalloc(PAGE_SIZE, GFP_KERNEL); 436 unsigned long *n = kzalloc(PAGE_SIZE, GFP_KERNEL);
@@ -604,7 +604,7 @@ static void int_seq_stop(struct seq_file *f, void *v)
604} 604}
605 605
606 606
607static struct seq_operations int_seq_ops = { 607static const struct seq_operations int_seq_ops = {
608 .start = int_seq_start, 608 .start = int_seq_start,
609 .next = int_seq_next, 609 .next = int_seq_next,
610 .stop = int_seq_stop, 610 .stop = int_seq_stop,