]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/atm/proc.c
x86: fix asm-x86/byteorder.h for userspace export
[linux-2.6-omap-h63xx.git] / net / atm / proc.c
index 9e61e512f6670d77f0f7f0e2a55d1f79cb60ff5d..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>
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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++) {