From 0fa76939890c331a1c5de59133a833ef64c9e582 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 8 Dec 2009 07:20:48 -0200 Subject: [PATCH] Use the race free function for adding a proc file. --- hello_procfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hello_procfs.c b/hello_procfs.c index 956f74d..5e0e082 100644 --- a/hello_procfs.c +++ b/hello_procfs.c @@ -53,8 +53,7 @@ static int hello_procfs_init(void) /* create the proc entry and set its fops: there is a potential race * here */ struct proc_dir_entry *entry; - entry = create_proc_entry("hellop", 0666, NULL); - entry->proc_fops = &hello_procfs_fops; + entry = proc_create("hellop", 0666, NULL, &hello_procfs_fops); return 0; } -- 2.20.1