patch-2.3.30 linux/drivers/isdn/avmb1/kcapi.c

Next file: linux/drivers/isdn/divert/divert_procfs.c
Previous file: linux/drivers/i2o/i2o_proc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/drivers/isdn/avmb1/kcapi.c linux/drivers/isdn/avmb1/kcapi.c
@@ -877,14 +877,8 @@
 	*pp = card;
 	driver->ncontroller++;
 	sprintf(card->procfn, "capi/controllers/%d", card->cnr);
-	card->procent = create_proc_entry(card->procfn, 0, 0);
-	if (card->procent) {
-	   card->procent->read_proc = 
-		(int (*)(char *,char **,off_t,int,int *,void *))
-			driver->ctr_read_proc;
-	   card->procent->data = card;
-	}
-
+	card->procent = create_proc_read_entry(card->procfn, 0, 0,
+					driver->ctr_read_proc, card);
 	ncards++;
 	printk(KERN_NOTICE "kcapi: Controller %d: %s attached\n",
 			card->cnr, card->name);
@@ -960,17 +954,11 @@
 		t1isa_driver = driver;
 #endif
 	sprintf(driver->procfn, "capi/drivers/%s", driver->name);
-	driver->procent = create_proc_entry(driver->procfn, 0, 0);
-	if (driver->procent) {
-	   if (driver->driver_read_proc) {
-		   driver->procent->read_proc = 
-	       		(int (*)(char *,char **,off_t,int,int *,void *))
-					driver->driver_read_proc;
-	   } else {
-		   driver->procent->read_proc = driver_read_proc;
-	   }
-	   driver->procent->data = driver;
-	}
+	driver->procent = create_proc_read_entry(driver->procfn, 0, 0,
+						driver->driver_read_proc
+						? driver->driver_read_proc
+						: driver_read_proc,
+					        driver);
 	return &di;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)