diff options
Diffstat (limited to 'arch/um/drivers/mconsole_kern.c')
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index e14629c87de4..f0fa47f10e6c 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -833,8 +833,8 @@ static int __init mconsole_init(void) | |||
833 | 833 | ||
834 | __initcall(mconsole_init); | 834 | __initcall(mconsole_init); |
835 | 835 | ||
836 | static int write_proc_mconsole(struct file *file, const char __user *buffer, | 836 | static ssize_t mconsole_proc_write(struct file *file, |
837 | unsigned long count, void *data) | 837 | const char __user *buffer, size_t count, loff_t *pos) |
838 | { | 838 | { |
839 | char *buf; | 839 | char *buf; |
840 | 840 | ||
@@ -855,6 +855,11 @@ static int write_proc_mconsole(struct file *file, const char __user *buffer, | |||
855 | return count; | 855 | return count; |
856 | } | 856 | } |
857 | 857 | ||
858 | static const struct file_operations mconsole_proc_fops = { | ||
859 | .owner = THIS_MODULE, | ||
860 | .write = mconsole_proc_write, | ||
861 | }; | ||
862 | |||
858 | static int create_proc_mconsole(void) | 863 | static int create_proc_mconsole(void) |
859 | { | 864 | { |
860 | struct proc_dir_entry *ent; | 865 | struct proc_dir_entry *ent; |
@@ -862,15 +867,12 @@ static int create_proc_mconsole(void) | |||
862 | if (notify_socket == NULL) | 867 | if (notify_socket == NULL) |
863 | return 0; | 868 | return 0; |
864 | 869 | ||
865 | ent = create_proc_entry("mconsole", S_IFREG | 0200, NULL); | 870 | ent = proc_create("mconsole", 0200, NULL, &mconsole_proc_fops); |
866 | if (ent == NULL) { | 871 | if (ent == NULL) { |
867 | printk(KERN_INFO "create_proc_mconsole : create_proc_entry " | 872 | printk(KERN_INFO "create_proc_mconsole : create_proc_entry " |
868 | "failed\n"); | 873 | "failed\n"); |
869 | return 0; | 874 | return 0; |
870 | } | 875 | } |
871 | |||
872 | ent->read_proc = NULL; | ||
873 | ent->write_proc = write_proc_mconsole; | ||
874 | return 0; | 876 | return 0; |
875 | } | 877 | } |
876 | 878 | ||