diff options
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 739866bfe9e9..9e61e512f667 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c | |||
@@ -33,7 +33,7 @@ | |||
33 | static ssize_t proc_dev_atm_read(struct file *file,char __user *buf,size_t count, | 33 | static ssize_t proc_dev_atm_read(struct file *file,char __user *buf,size_t count, |
34 | loff_t *pos); | 34 | loff_t *pos); |
35 | 35 | ||
36 | static struct file_operations proc_atm_dev_ops = { | 36 | static const struct file_operations proc_atm_dev_ops = { |
37 | .owner = THIS_MODULE, | 37 | .owner = THIS_MODULE, |
38 | .read = proc_dev_atm_read, | 38 | .read = proc_dev_atm_read, |
39 | }; | 39 | }; |
@@ -86,7 +86,7 @@ static int __vcc_walk(struct sock **sock, int family, int *bucket, loff_t l) | |||
86 | break; | 86 | break; |
87 | } | 87 | } |
88 | l--; | 88 | l--; |
89 | } | 89 | } |
90 | try_again: | 90 | try_again: |
91 | for (; sk; sk = sk_next(sk)) { | 91 | for (; sk; sk = sk_next(sk)) { |
92 | l -= compare_family(sk, family); | 92 | l -= compare_family(sk, family); |
@@ -205,7 +205,7 @@ static void vcc_info(struct seq_file *seq, struct atm_vcc *vcc) | |||
205 | seq_printf(seq, "%p ", vcc); | 205 | seq_printf(seq, "%p ", vcc); |
206 | if (!vcc->dev) | 206 | if (!vcc->dev) |
207 | seq_printf(seq, "Unassigned "); | 207 | seq_printf(seq, "Unassigned "); |
208 | else | 208 | else |
209 | seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi, | 209 | seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi, |
210 | vcc->vci); | 210 | vcc->vci); |
211 | switch (sk->sk_family) { | 211 | switch (sk->sk_family) { |
@@ -249,7 +249,7 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v) | |||
249 | static char atm_dev_banner[] = | 249 | static char atm_dev_banner[] = |
250 | "Itf Type ESI/\"MAC\"addr " | 250 | "Itf Type ESI/\"MAC\"addr " |
251 | "AAL(TX,err,RX,err,drop) ... [refcnt]\n"; | 251 | "AAL(TX,err,RX,err,drop) ... [refcnt]\n"; |
252 | 252 | ||
253 | if (v == (void *)1) | 253 | if (v == (void *)1) |
254 | seq_puts(seq, atm_dev_banner); | 254 | seq_puts(seq, atm_dev_banner); |
255 | else { | 255 | else { |
@@ -257,22 +257,22 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v) | |||
257 | 257 | ||
258 | atm_dev_info(seq, dev); | 258 | atm_dev_info(seq, dev); |
259 | } | 259 | } |
260 | return 0; | 260 | return 0; |
261 | } | 261 | } |
262 | 262 | ||
263 | static struct seq_operations atm_dev_seq_ops = { | 263 | static struct seq_operations atm_dev_seq_ops = { |
264 | .start = atm_dev_seq_start, | 264 | .start = atm_dev_seq_start, |
265 | .next = atm_dev_seq_next, | 265 | .next = atm_dev_seq_next, |
266 | .stop = atm_dev_seq_stop, | 266 | .stop = atm_dev_seq_stop, |
267 | .show = atm_dev_seq_show, | 267 | .show = atm_dev_seq_show, |
268 | }; | 268 | }; |
269 | 269 | ||
270 | static int atm_dev_seq_open(struct inode *inode, struct file *file) | 270 | static int atm_dev_seq_open(struct inode *inode, struct file *file) |
271 | { | 271 | { |
272 | return seq_open(file, &atm_dev_seq_ops); | 272 | return seq_open(file, &atm_dev_seq_ops); |
273 | } | 273 | } |
274 | 274 | ||
275 | static struct file_operations devices_seq_fops = { | 275 | static const struct file_operations devices_seq_fops = { |
276 | .open = atm_dev_seq_open, | 276 | .open = atm_dev_seq_open, |
277 | .read = seq_read, | 277 | .read = seq_read, |
278 | .llseek = seq_lseek, | 278 | .llseek = seq_lseek, |
@@ -281,7 +281,7 @@ static struct file_operations devices_seq_fops = { | |||
281 | 281 | ||
282 | static int pvc_seq_show(struct seq_file *seq, void *v) | 282 | static int pvc_seq_show(struct seq_file *seq, void *v) |
283 | { | 283 | { |
284 | static char atm_pvc_banner[] = | 284 | static char atm_pvc_banner[] = |
285 | "Itf VPI VCI AAL RX(PCR,Class) TX(PCR,Class)\n"; | 285 | "Itf VPI VCI AAL RX(PCR,Class) TX(PCR,Class)\n"; |
286 | 286 | ||
287 | if (v == (void *)1) | 287 | if (v == (void *)1) |
@@ -307,7 +307,7 @@ static int pvc_seq_open(struct inode *inode, struct file *file) | |||
307 | return __vcc_seq_open(inode, file, PF_ATMPVC, &pvc_seq_ops); | 307 | return __vcc_seq_open(inode, file, PF_ATMPVC, &pvc_seq_ops); |
308 | } | 308 | } |
309 | 309 | ||
310 | static struct file_operations pvc_seq_fops = { | 310 | static const struct file_operations pvc_seq_fops = { |
311 | .open = pvc_seq_open, | 311 | .open = pvc_seq_open, |
312 | .read = seq_read, | 312 | .read = seq_read, |
313 | .llseek = seq_lseek, | 313 | .llseek = seq_lseek, |
@@ -316,32 +316,32 @@ static struct file_operations pvc_seq_fops = { | |||
316 | 316 | ||
317 | static int vcc_seq_show(struct seq_file *seq, void *v) | 317 | static int vcc_seq_show(struct seq_file *seq, void *v) |
318 | { | 318 | { |
319 | if (v == (void *)1) { | 319 | if (v == (void *)1) { |
320 | seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s", | 320 | seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s", |
321 | "Address ", "Itf VPI VCI Fam Flags Reply " | 321 | "Address ", "Itf VPI VCI Fam Flags Reply " |
322 | "Send buffer Recv buffer [refcnt]\n"); | 322 | "Send buffer Recv buffer [refcnt]\n"); |
323 | } else { | 323 | } else { |
324 | struct vcc_state *state = seq->private; | 324 | struct vcc_state *state = seq->private; |
325 | struct atm_vcc *vcc = atm_sk(state->sk); | 325 | struct atm_vcc *vcc = atm_sk(state->sk); |
326 | 326 | ||
327 | vcc_info(seq, vcc); | 327 | vcc_info(seq, vcc); |
328 | } | 328 | } |
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | static struct seq_operations vcc_seq_ops = { | 332 | static struct seq_operations vcc_seq_ops = { |
333 | .start = vcc_seq_start, | 333 | .start = vcc_seq_start, |
334 | .next = vcc_seq_next, | 334 | .next = vcc_seq_next, |
335 | .stop = vcc_seq_stop, | 335 | .stop = vcc_seq_stop, |
336 | .show = vcc_seq_show, | 336 | .show = vcc_seq_show, |
337 | }; | 337 | }; |
338 | 338 | ||
339 | static int vcc_seq_open(struct inode *inode, struct file *file) | 339 | static int vcc_seq_open(struct inode *inode, struct file *file) |
340 | { | 340 | { |
341 | return __vcc_seq_open(inode, file, 0, &vcc_seq_ops); | 341 | return __vcc_seq_open(inode, file, 0, &vcc_seq_ops); |
342 | } | 342 | } |
343 | 343 | ||
344 | static struct file_operations vcc_seq_fops = { | 344 | static const struct file_operations vcc_seq_fops = { |
345 | .open = vcc_seq_open, | 345 | .open = vcc_seq_open, |
346 | .read = seq_read, | 346 | .read = seq_read, |
347 | .llseek = seq_lseek, | 347 | .llseek = seq_lseek, |
@@ -350,7 +350,7 @@ static struct file_operations vcc_seq_fops = { | |||
350 | 350 | ||
351 | static int svc_seq_show(struct seq_file *seq, void *v) | 351 | static int svc_seq_show(struct seq_file *seq, void *v) |
352 | { | 352 | { |
353 | static char atm_svc_banner[] = | 353 | static char atm_svc_banner[] = |
354 | "Itf VPI VCI State Remote\n"; | 354 | "Itf VPI VCI State Remote\n"; |
355 | 355 | ||
356 | if (v == (void *)1) | 356 | if (v == (void *)1) |
@@ -376,7 +376,7 @@ static int svc_seq_open(struct inode *inode, struct file *file) | |||
376 | return __vcc_seq_open(inode, file, PF_ATMSVC, &svc_seq_ops); | 376 | return __vcc_seq_open(inode, file, PF_ATMSVC, &svc_seq_ops); |
377 | } | 377 | } |
378 | 378 | ||
379 | static struct file_operations svc_seq_fops = { | 379 | static const struct file_operations svc_seq_fops = { |
380 | .open = svc_seq_open, | 380 | .open = svc_seq_open, |
381 | .read = seq_read, | 381 | .read = seq_read, |
382 | .llseek = seq_lseek, | 382 | .llseek = seq_lseek, |
@@ -457,7 +457,7 @@ void atm_proc_dev_deregister(struct atm_dev *dev) | |||
457 | 457 | ||
458 | static struct atm_proc_entry { | 458 | static struct atm_proc_entry { |
459 | char *name; | 459 | char *name; |
460 | struct file_operations *proc_fops; | 460 | const struct file_operations *proc_fops; |
461 | struct proc_dir_entry *dirent; | 461 | struct proc_dir_entry *dirent; |
462 | } atm_proc_ents[] = { | 462 | } atm_proc_ents[] = { |
463 | { .name = "devices", .proc_fops = &devices_seq_fops }, | 463 | { .name = "devices", .proc_fops = &devices_seq_fops }, |
@@ -472,7 +472,7 @@ static void atm_proc_dirs_remove(void) | |||
472 | static struct atm_proc_entry *e; | 472 | static struct atm_proc_entry *e; |
473 | 473 | ||
474 | for (e = atm_proc_ents; e->name; e++) { | 474 | for (e = atm_proc_ents; e->name; e++) { |
475 | if (e->dirent) | 475 | if (e->dirent) |
476 | remove_proc_entry(e->name, atm_proc_root); | 476 | remove_proc_entry(e->name, atm_proc_root); |
477 | } | 477 | } |
478 | remove_proc_entry("net/atm", NULL); | 478 | remove_proc_entry("net/atm", NULL); |