From e552d45561e3f04541d454644cabb8873d03fb6a Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Sat, 4 Oct 2008 14:39:12 +0400 Subject: [PATCH] --- yaml --- r: 117651 b: refs/heads/master c: ae048112c099b0f3adb57f7c0b3a49bc62244609 h: refs/heads/master i: 117649: aabd98452d07d558b9f671a0a666d8e73f0307f0 117647: 3761f6967348405d821ea5b8a1d7f5dd8250203e v: v3 --- [refs] | 2 +- trunk/fs/proc/internal.h | 1 - trunk/fs/proc/kmsg.c | 12 +++++++++--- trunk/fs/proc/proc_misc.c | 3 --- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 08e150edd348..43994cabbc64 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 659689280ad91d31235db79cda6c7c799c4d3781 +refs/heads/master: ae048112c099b0f3adb57f7c0b3a49bc62244609 diff --git a/trunk/fs/proc/internal.h b/trunk/fs/proc/internal.h index d5bf4dec6b0a..3e8aeb8b61ce 100644 --- a/trunk/fs/proc/internal.h +++ b/trunk/fs/proc/internal.h @@ -61,7 +61,6 @@ extern const struct file_operations proc_smaps_operations; extern const struct file_operations proc_clear_refs_operations; extern const struct file_operations proc_pagemap_operations; extern const struct file_operations proc_net_operations; -extern const struct file_operations proc_kmsg_operations; extern const struct inode_operations proc_net_inode_operations; void free_proc_entry(struct proc_dir_entry *de); diff --git a/trunk/fs/proc/kmsg.c b/trunk/fs/proc/kmsg.c index 9fd5df3f40ce..7ca78346d3f0 100644 --- a/trunk/fs/proc/kmsg.c +++ b/trunk/fs/proc/kmsg.c @@ -10,13 +10,12 @@ #include #include #include +#include #include #include #include -#include "internal.h" - extern wait_queue_head_t log_wait; extern int do_syslog(int type, char __user *bug, int count); @@ -49,9 +48,16 @@ static unsigned int kmsg_poll(struct file *file, poll_table *wait) } -const struct file_operations proc_kmsg_operations = { +static const struct file_operations proc_kmsg_operations = { .read = kmsg_read, .poll = kmsg_poll, .open = kmsg_open, .release = kmsg_release, }; + +static int __init proc_kmsg_init(void) +{ + proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); + return 0; +} +module_init(proc_kmsg_init); diff --git a/trunk/fs/proc/proc_misc.c b/trunk/fs/proc/proc_misc.c index e177f42496c4..fcac25edaef7 100644 --- a/trunk/fs/proc/proc_misc.c +++ b/trunk/fs/proc/proc_misc.c @@ -605,9 +605,6 @@ void __init proc_misc_init(void) proc_symlink("mounts", NULL, "self/mounts"); /* And now for trickier ones */ -#ifdef CONFIG_PRINTK - proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); -#endif #ifdef CONFIG_FILE_LOCKING proc_create("locks", 0, NULL, &proc_locks_operations); #endif