aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rtc.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 04:02:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:22 -0400
commit1b50221738108c438d5f25c7a043fb89e9e27044 (patch)
tree510b2baf0675fee9ce450b6756ff36c77e2f626c /drivers/char/rtc.c
parent0fd689468231cb5eee9cc5d6331081b77c7a7a76 (diff)
drivers: use non-racy method for proc entries creation
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/rtc.c')
-rw-r--r--drivers/char/rtc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index e2ec2ee4cf79..5f80a9dff573 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -1069,10 +1069,8 @@ no_irq:
1069 } 1069 }
1070 1070
1071#ifdef CONFIG_PROC_FS 1071#ifdef CONFIG_PROC_FS
1072 ent = create_proc_entry("driver/rtc", 0, NULL); 1072 ent = proc_create("driver/rtc", 0, NULL, &rtc_proc_fops);
1073 if (ent) 1073 if (!ent)
1074 ent->proc_fops = &rtc_proc_fops;
1075 else
1076 printk(KERN_WARNING "rtc: Failed to register with procfs.\n"); 1074 printk(KERN_WARNING "rtc: Failed to register with procfs.\n");
1077#endif 1075#endif
1078 1076