提交 11ae9dd4 编写于 作者: A Alexey Dobriyan 提交者: Ingo Molnar

x86: switch to proc_create()

Signed-off-by: NAlexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 b5964405
...@@ -2217,7 +2217,6 @@ static struct dmi_system_id __initdata apm_dmi_table[] = { ...@@ -2217,7 +2217,6 @@ static struct dmi_system_id __initdata apm_dmi_table[] = {
*/ */
static int __init apm_init(void) static int __init apm_init(void)
{ {
struct proc_dir_entry *apm_proc;
struct desc_struct *gdt; struct desc_struct *gdt;
int err; int err;
...@@ -2322,9 +2321,7 @@ static int __init apm_init(void) ...@@ -2322,9 +2321,7 @@ static int __init apm_init(void)
set_base(gdt[APM_DS >> 3], set_base(gdt[APM_DS >> 3],
__va((unsigned long)apm_info.bios.dseg << 4)); __va((unsigned long)apm_info.bios.dseg << 4));
apm_proc = create_proc_entry("apm", 0, NULL); proc_create("apm", 0, NULL, &apm_file_ops);
if (apm_proc)
apm_proc->proc_fops = &apm_file_ops;
kapmd_task = kthread_create(apm, NULL, "kapmd"); kapmd_task = kthread_create(apm, NULL, "kapmd");
if (IS_ERR(kapmd_task)) { if (IS_ERR(kapmd_task)) {
......
...@@ -424,11 +424,10 @@ static int __init mtrr_if_init(void) ...@@ -424,11 +424,10 @@ static int __init mtrr_if_init(void)
return -ENODEV; return -ENODEV;
proc_root_mtrr = proc_root_mtrr =
create_proc_entry("mtrr", S_IWUSR | S_IRUGO, &proc_root); proc_create("mtrr", S_IWUSR | S_IRUGO, &proc_root, &mtrr_fops);
if (proc_root_mtrr) {
if (proc_root_mtrr)
proc_root_mtrr->owner = THIS_MODULE; proc_root_mtrr->owner = THIS_MODULE;
proc_root_mtrr->proc_fops = &mtrr_fops;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册