diff options
| author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-02-08 07:21:19 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:38 -0500 |
| commit | 03a44825be987d720df854f63b2f7bd30e46bdde (patch) | |
| tree | 6ac01a425ff2201db972fd3b836efc9b0ab6eaec /fs/proc/proc_misc.c | |
| parent | ec26e11740cdff8c3c8330ea235478704ffb4a71 (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.c | 22 |
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 | ||
| 225 | extern struct seq_operations fragmentation_op; | 225 | extern const struct seq_operations fragmentation_op; |
| 226 | static int fragmentation_open(struct inode *inode, struct file *file) | 226 | static 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 | ||
| 239 | extern struct seq_operations pagetypeinfo_op; | 239 | extern const struct seq_operations pagetypeinfo_op; |
| 240 | static int pagetypeinfo_open(struct inode *inode, struct file *file) | 240 | static 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 | ||
| 252 | extern struct seq_operations zoneinfo_op; | 252 | extern const struct seq_operations zoneinfo_op; |
| 253 | static int zoneinfo_open(struct inode *inode, struct file *file) | 253 | static 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 | ||
| 277 | extern struct seq_operations cpuinfo_op; | 277 | extern const struct seq_operations cpuinfo_op; |
| 278 | static int cpuinfo_open(struct inode *inode, struct file *file) | 278 | static 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 | ||
| 330 | static struct seq_operations devinfo_ops = { | 330 | static 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 | ||
| 349 | extern struct seq_operations vmstat_op; | 349 | extern const struct seq_operations vmstat_op; |
| 350 | static int vmstat_open(struct inode *inode, struct file *file) | 350 | static 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 |
| 380 | extern struct seq_operations partitions_op; | 380 | extern const struct seq_operations partitions_op; |
| 381 | static int partitions_open(struct inode *inode, struct file *file) | 381 | static 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 | ||
| 392 | extern struct seq_operations diskstats_op; | 392 | extern const struct seq_operations diskstats_op; |
| 393 | static int diskstats_open(struct inode *inode, struct file *file) | 393 | static 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 |
| 406 | extern struct seq_operations modules_op; | 406 | extern const struct seq_operations modules_op; |
| 407 | static int modules_open(struct inode *inode, struct file *file) | 407 | static 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 |
| 433 | extern struct seq_operations slabstats_op; | 433 | extern const struct seq_operations slabstats_op; |
| 434 | static int slabstats_open(struct inode *inode, struct file *file) | 434 | static 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 | ||
| 607 | static struct seq_operations int_seq_ops = { | 607 | static 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, |
