| .. | .. |
|---|
| 49 | 49 | } |
|---|
| 50 | 50 | |
|---|
| 51 | 51 | |
|---|
| 52 | | -static const struct file_operations proc_kmsg_operations = { |
|---|
| 53 | | - .read = kmsg_read, |
|---|
| 54 | | - .poll = kmsg_poll, |
|---|
| 55 | | - .open = kmsg_open, |
|---|
| 56 | | - .release = kmsg_release, |
|---|
| 57 | | - .llseek = generic_file_llseek, |
|---|
| 52 | +static const struct proc_ops kmsg_proc_ops = { |
|---|
| 53 | + .proc_flags = PROC_ENTRY_PERMANENT, |
|---|
| 54 | + .proc_read = kmsg_read, |
|---|
| 55 | + .proc_poll = kmsg_poll, |
|---|
| 56 | + .proc_open = kmsg_open, |
|---|
| 57 | + .proc_release = kmsg_release, |
|---|
| 58 | + .proc_lseek = generic_file_llseek, |
|---|
| 58 | 59 | }; |
|---|
| 59 | 60 | |
|---|
| 60 | 61 | static int __init proc_kmsg_init(void) |
|---|
| 61 | 62 | { |
|---|
| 62 | | - proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); |
|---|
| 63 | + proc_create("kmsg", S_IRUSR, NULL, &kmsg_proc_ops); |
|---|
| 63 | 64 | return 0; |
|---|
| 64 | 65 | } |
|---|
| 65 | 66 | fs_initcall(proc_kmsg_init); |
|---|