aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/capi/kcapi.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2010-01-14 06:10:54 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-14 06:10:54 -0500
commit9a58a80a701bdb2d220cdab4914218df5b48d781 (patch)
tree01eeb65ec70f22ec326d0938d002cc6a2aec73e8 /drivers/isdn/capi/kcapi.c
parent508e14b4a4fb1a824a14f2c5b8d7df67b313f8e4 (diff)
proc_fops: convert drivers/isdn/ to seq_file
Convert code away from ->read_proc/->write_proc interfaces. Switch to proc_create()/proc_create_data() which make addition of proc entries reliable wrt NULL ->proc_fops, NULL ->data and so on. Problem with ->read_proc et al is described here commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in /proc entries" [akpm@linux-foundation.org: CONFIG_PROC_FS=n build fix] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Karsten Keil <keil@b1-systems.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/capi/kcapi.c')
-rw-r--r--drivers/isdn/capi/kcapi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
index dc506ab99cac..b0bacf377c18 100644
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -490,13 +490,7 @@ attach_capi_ctr(struct capi_ctr *card)
490 card->traceflag = showcapimsgs; 490 card->traceflag = showcapimsgs;
491 491
492 sprintf(card->procfn, "capi/controllers/%d", card->cnr); 492 sprintf(card->procfn, "capi/controllers/%d", card->cnr);
493 card->procent = create_proc_entry(card->procfn, 0, NULL); 493 card->procent = proc_create_data(card->procfn, 0, NULL, card->proc_fops, card);
494 if (card->procent) {
495 card->procent->read_proc =
496 (int (*)(char *,char **,off_t,int,int *,void *))
497 card->ctr_read_proc;
498 card->procent->data = card;
499 }
500 494
501 ncards++; 495 ncards++;
502 printk(KERN_NOTICE "kcapi: Controller [%03d]: %s attached\n", 496 printk(KERN_NOTICE "kcapi: Controller [%03d]: %s attached\n",