]> err.no Git - linux-2.6/blobdiff - net/atm/proc.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-2.6] / net / atm / proc.c
index 190f49ce2cadd84db06cbc84b5ee61ce79d35828..5d9d5ffba145d5295ff9dab749739547376ca0ca 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/netdevice.h>
 #include <linux/atmclip.h>
 #include <linux/init.h> /* for __init */
+#include <net/net_namespace.h>
 #include <net/atmclip.h>
 #include <asm/uaccess.h>
 #include <asm/atomic.h>
@@ -33,7 +34,7 @@
 static ssize_t proc_dev_atm_read(struct file *file,char __user *buf,size_t count,
     loff_t *pos);
 
-static struct file_operations proc_atm_dev_ops = {
+static const struct file_operations proc_atm_dev_ops = {
        .owner =        THIS_MODULE,
        .read =         proc_dev_atm_read,
 };
@@ -110,7 +111,7 @@ static inline void *vcc_walk(struct vcc_state *state, loff_t l)
 }
 
 static int __vcc_seq_open(struct inode *inode, struct file *file,
-       int family, struct seq_operations *ops)
+       int family, const struct seq_operations *ops)
 {
        struct vcc_state *state;
        struct seq_file *seq;
@@ -175,7 +176,7 @@ static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc)
 
        seq_printf(seq, "%3d %3d %5d %-3s %7d %-5s %7d %-6s",
            vcc->dev->number,vcc->vpi,vcc->vci,
-           vcc->qos.aal >= sizeof(aal_name)/sizeof(aal_name[0]) ? "err" :
+           vcc->qos.aal >= ARRAY_SIZE(aal_name) ? "err" :
            aal_name[vcc->qos.aal],vcc->qos.rxtp.min_pcr,
            class_name[vcc->qos.rxtp.traffic_class],vcc->qos.txtp.min_pcr,
            class_name[vcc->qos.txtp.traffic_class]);
@@ -260,7 +261,7 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations atm_dev_seq_ops = {
+static const struct seq_operations atm_dev_seq_ops = {
        .start  = atm_dev_seq_start,
        .next   = atm_dev_seq_next,
        .stop   = atm_dev_seq_stop,
@@ -272,7 +273,7 @@ static int atm_dev_seq_open(struct inode *inode, struct file *file)
        return seq_open(file, &atm_dev_seq_ops);
 }
 
-static struct file_operations devices_seq_fops = {
+static const struct file_operations devices_seq_fops = {
        .open           = atm_dev_seq_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -295,7 +296,7 @@ static int pvc_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations pvc_seq_ops = {
+static const struct seq_operations pvc_seq_ops = {
        .start  = vcc_seq_start,
        .next   = vcc_seq_next,
        .stop   = vcc_seq_stop,
@@ -307,7 +308,7 @@ static int pvc_seq_open(struct inode *inode, struct file *file)
        return __vcc_seq_open(inode, file, PF_ATMPVC, &pvc_seq_ops);
 }
 
-static struct file_operations pvc_seq_fops = {
+static const struct file_operations pvc_seq_fops = {
        .open           = pvc_seq_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -329,7 +330,7 @@ static int vcc_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations vcc_seq_ops = {
+static const struct seq_operations vcc_seq_ops = {
        .start  = vcc_seq_start,
        .next   = vcc_seq_next,
        .stop   = vcc_seq_stop,
@@ -341,7 +342,7 @@ static int vcc_seq_open(struct inode *inode, struct file *file)
        return __vcc_seq_open(inode, file, 0, &vcc_seq_ops);
 }
 
-static struct file_operations vcc_seq_fops = {
+static const struct file_operations vcc_seq_fops = {
        .open           = vcc_seq_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -364,7 +365,7 @@ static int svc_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations svc_seq_ops = {
+static const struct seq_operations svc_seq_ops = {
        .start  = vcc_seq_start,
        .next   = vcc_seq_next,
        .stop   = vcc_seq_stop,
@@ -376,7 +377,7 @@ static int svc_seq_open(struct inode *inode, struct file *file)
        return __vcc_seq_open(inode, file, PF_ATMSVC, &svc_seq_ops);
 }
 
-static struct file_operations svc_seq_fops = {
+static const struct file_operations svc_seq_fops = {
        .open           = svc_seq_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -457,7 +458,7 @@ void atm_proc_dev_deregister(struct atm_dev *dev)
 
 static struct atm_proc_entry {
        char *name;
-       struct file_operations *proc_fops;
+       const struct file_operations *proc_fops;
        struct proc_dir_entry *dirent;
 } atm_proc_ents[] = {
        { .name = "devices",    .proc_fops = &devices_seq_fops },
@@ -475,7 +476,7 @@ static void atm_proc_dirs_remove(void)
                if (e->dirent)
                        remove_proc_entry(e->name, atm_proc_root);
        }
-       remove_proc_entry("net/atm", NULL);
+       remove_proc_entry("atm", init_net.proc_net);
 }
 
 int __init atm_proc_init(void)
@@ -483,7 +484,7 @@ int __init atm_proc_init(void)
        static struct atm_proc_entry *e;
        int ret;
 
-       atm_proc_root = proc_mkdir("net/atm",NULL);
+       atm_proc_root = proc_mkdir("atm", init_net.proc_net);
        if (!atm_proc_root)
                goto err_out;
        for (e = atm_proc_ents; e->name; e++) {