diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-02-12 23:57:21 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-02-12 23:57:21 -0600 |
commit | 54c66f6d781e03dc0b23956234963c4911e6d1c0 (patch) | |
tree | 40619a66ae6d8703a57bf681d087ffeabbffd346 /net/atm/proc.c | |
parent | 8ce0a7df6e6117d8814e976d4b7ce6a6b2c9cf93 (diff) | |
parent | 17e0e27020d028a790d97699aff85a43af5be472 (diff) |
Merge branch 'master' into 85xx
Diffstat (limited to 'net/atm/proc.c')
-rw-r--r-- | net/atm/proc.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/net/atm/proc.c b/net/atm/proc.c index 739866bfe9e..9e61e512f66 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c @@ -33,7 +33,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, }; @@ -86,7 +86,7 @@ static int __vcc_walk(struct sock **sock, int family, int *bucket, loff_t l) break; } l--; - } + } try_again: for (; sk; sk = sk_next(sk)) { l -= compare_family(sk, family); @@ -205,7 +205,7 @@ static void vcc_info(struct seq_file *seq, struct atm_vcc *vcc) seq_printf(seq, "%p ", vcc); if (!vcc->dev) seq_printf(seq, "Unassigned "); - else + else seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi, vcc->vci); switch (sk->sk_family) { @@ -249,7 +249,7 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v) static char atm_dev_banner[] = "Itf Type ESI/\"MAC\"addr " "AAL(TX,err,RX,err,drop) ... [refcnt]\n"; - + if (v == (void *)1) seq_puts(seq, atm_dev_banner); else { @@ -257,22 +257,22 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v) atm_dev_info(seq, dev); } - return 0; + return 0; } - + static struct seq_operations atm_dev_seq_ops = { .start = atm_dev_seq_start, .next = atm_dev_seq_next, .stop = atm_dev_seq_stop, .show = atm_dev_seq_show, }; - + 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, @@ -281,7 +281,7 @@ static struct file_operations devices_seq_fops = { static int pvc_seq_show(struct seq_file *seq, void *v) { - static char atm_pvc_banner[] = + static char atm_pvc_banner[] = "Itf VPI VCI AAL RX(PCR,Class) TX(PCR,Class)\n"; if (v == (void *)1) @@ -307,7 +307,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, @@ -316,32 +316,32 @@ static struct file_operations pvc_seq_fops = { static int vcc_seq_show(struct seq_file *seq, void *v) { - if (v == (void *)1) { - seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s", - "Address ", "Itf VPI VCI Fam Flags Reply " - "Send buffer Recv buffer [refcnt]\n"); - } else { - struct vcc_state *state = seq->private; - struct atm_vcc *vcc = atm_sk(state->sk); - - vcc_info(seq, vcc); - } - return 0; + if (v == (void *)1) { + seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s", + "Address ", "Itf VPI VCI Fam Flags Reply " + "Send buffer Recv buffer [refcnt]\n"); + } else { + struct vcc_state *state = seq->private; + struct atm_vcc *vcc = atm_sk(state->sk); + + vcc_info(seq, vcc); + } + return 0; } - + static struct seq_operations vcc_seq_ops = { - .start = vcc_seq_start, - .next = vcc_seq_next, - .stop = vcc_seq_stop, - .show = vcc_seq_show, + .start = vcc_seq_start, + .next = vcc_seq_next, + .stop = vcc_seq_stop, + .show = vcc_seq_show, }; - + static int vcc_seq_open(struct inode *inode, struct file *file) { - return __vcc_seq_open(inode, file, 0, &vcc_seq_ops); + 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, @@ -350,7 +350,7 @@ static struct file_operations vcc_seq_fops = { static int svc_seq_show(struct seq_file *seq, void *v) { - static char atm_svc_banner[] = + static char atm_svc_banner[] = "Itf VPI VCI State Remote\n"; if (v == (void *)1) @@ -376,7 +376,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 +457,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 }, @@ -472,7 +472,7 @@ static void atm_proc_dirs_remove(void) static struct atm_proc_entry *e; for (e = atm_proc_ents; e->name; e++) { - if (e->dirent) + if (e->dirent) remove_proc_entry(e->name, atm_proc_root); } remove_proc_entry("net/atm", NULL); |