Skip to content

Commit

Permalink
x86: switch to proc_create()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Alexey Dobriyan authored and Ingo Molnar committed Apr 17, 2008
1 parent b596440 commit 11ae9dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 1 addition & 4 deletions arch/x86/kernel/apm_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,6 @@ static struct dmi_system_id __initdata apm_dmi_table[] = {
*/
static int __init apm_init(void)
{
struct proc_dir_entry *apm_proc;
struct desc_struct *gdt;
int err;

Expand Down Expand Up @@ -2322,9 +2321,7 @@ static int __init apm_init(void)
set_base(gdt[APM_DS >> 3],
__va((unsigned long)apm_info.bios.dseg << 4));

apm_proc = create_proc_entry("apm", 0, NULL);
if (apm_proc)
apm_proc->proc_fops = &apm_file_ops;
proc_create("apm", 0, NULL, &apm_file_ops);

kapmd_task = kthread_create(apm, NULL, "kapmd");
if (IS_ERR(kapmd_task)) {
Expand Down
7 changes: 3 additions & 4 deletions arch/x86/kernel/cpu/mtrr/if.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,10 @@ static int __init mtrr_if_init(void)
return -ENODEV;

proc_root_mtrr =
create_proc_entry("mtrr", S_IWUSR | S_IRUGO, &proc_root);
if (proc_root_mtrr) {
proc_create("mtrr", S_IWUSR | S_IRUGO, &proc_root, &mtrr_fops);

if (proc_root_mtrr)
proc_root_mtrr->owner = THIS_MODULE;
proc_root_mtrr->proc_fops = &mtrr_fops;
}
return 0;
}

Expand Down

0 comments on commit 11ae9dd

Please sign in to comment.