| .. | .. |
|---|
| 16 | 16 | return seq_open(file, &cpuinfo_op); |
|---|
| 17 | 17 | } |
|---|
| 18 | 18 | |
|---|
| 19 | | -static const struct file_operations proc_cpuinfo_operations = { |
|---|
| 20 | | - .open = cpuinfo_open, |
|---|
| 21 | | - .read = seq_read, |
|---|
| 22 | | - .llseek = seq_lseek, |
|---|
| 23 | | - .release = seq_release, |
|---|
| 19 | +static const struct proc_ops cpuinfo_proc_ops = { |
|---|
| 20 | + .proc_flags = PROC_ENTRY_PERMANENT, |
|---|
| 21 | + .proc_open = cpuinfo_open, |
|---|
| 22 | + .proc_read_iter = seq_read_iter, |
|---|
| 23 | + .proc_lseek = seq_lseek, |
|---|
| 24 | + .proc_release = seq_release, |
|---|
| 24 | 25 | }; |
|---|
| 25 | 26 | |
|---|
| 26 | 27 | static int __init proc_cpuinfo_init(void) |
|---|
| 27 | 28 | { |
|---|
| 28 | | - proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations); |
|---|
| 29 | + proc_create("cpuinfo", 0, NULL, &cpuinfo_proc_ops); |
|---|
| 29 | 30 | return 0; |
|---|
| 30 | 31 | } |
|---|
| 31 | 32 | fs_initcall(proc_cpuinfo_init); |
|---|