]>
Commit | Line | Data |
---|---|---|
3246f29e | 1 | #include <linux/cpufreq.h> |
8591cf43 AD |
2 | #include <linux/fs.h> |
3 | #include <linux/init.h> | |
4 | #include <linux/proc_fs.h> | |
5 | #include <linux/seq_file.h> | |
6 | ||
3246f29e RW |
7 | __weak void arch_freq_prepare_all(void) |
8 | { | |
9 | } | |
10 | ||
8591cf43 AD |
11 | extern const struct seq_operations cpuinfo_op; |
12 | static int cpuinfo_open(struct inode *inode, struct file *file) | |
13 | { | |
3246f29e | 14 | arch_freq_prepare_all(); |
8591cf43 AD |
15 | return seq_open(file, &cpuinfo_op); |
16 | } | |
17 | ||
18 | static const struct file_operations proc_cpuinfo_operations = { | |
19 | .open = cpuinfo_open, | |
20 | .read = seq_read, | |
21 | .llseek = seq_lseek, | |
22 | .release = seq_release, | |
23 | }; | |
24 | ||
25 | static int __init proc_cpuinfo_init(void) | |
26 | { | |
27 | proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations); | |
28 | return 0; | |
29 | } | |
abaf3787 | 30 | fs_initcall(proc_cpuinfo_init); |