[NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.
[safe/jmp/linux-2.6] / net / atm / mpoa_proc.c
index 43315af..4990541 100644 (file)
@@ -39,7 +39,7 @@ static int parse_qos(const char *buff);
 /*
  *   Define allowed FILE OPERATIONS
  */
-static struct file_operations mpc_file_operations = {
+static const struct file_operations mpc_file_operations = {
        .owner =        THIS_MODULE,
        .open =         proc_mpc_open,
        .read =         seq_read,
@@ -177,7 +177,7 @@ static int mpc_show(struct seq_file *m, void *v)
        return 0;
 }
 
-static struct seq_operations mpc_op = {
+static const struct seq_operations mpc_op = {
        .start =        mpc_start,
        .next =         mpc_next,
        .stop =         mpc_stop,
@@ -276,12 +276,11 @@ int mpc_proc_init(void)
 {
        struct proc_dir_entry *p;
 
-       p = create_proc_entry(STAT_FILE_NAME, 0, atm_proc_root);
+       p = proc_create(STAT_FILE_NAME, 0, atm_proc_root, &mpc_file_operations);
        if (!p) {
                printk(KERN_ERR "Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME);
                return -ENOMEM;
        }
-       p->proc_fops = &mpc_file_operations;
        p->owner = THIS_MODULE;
        return 0;
 }