isdn: use non-racy method for proc entries creation
[pandora-kernel.git] / drivers / isdn / hardware / eicon / divasproc.c
index c12efa6..fae8958 100644 (file)
@@ -10,7 +10,6 @@
  * of the GNU General Public License, incorporated herein by reference.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/poll.h>
@@ -114,7 +113,7 @@ static int divas_close(struct inode *inode, struct file *file)
        return (0);
 }
 
-static struct file_operations divas_fops = {
+static const struct file_operations divas_fops = {
        .owner   = THIS_MODULE,
        .llseek  = no_llseek,
        .read    = divas_read,
@@ -126,15 +125,11 @@ static struct file_operations divas_fops = {
 
 int create_divas_proc(void)
 {
-       divas_proc_entry = create_proc_entry(divas_proc_name,
-                                            S_IFREG | S_IRUGO,
-                                            proc_net_eicon);
+       proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon,
+                   &divas_fops);
        if (!divas_proc_entry)
                return (0);
 
-       divas_proc_entry->proc_fops = &divas_fops;
-       divas_proc_entry->owner = THIS_MODULE;
-
        return (1);
 }