X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=blobdiff_plain;f=drivers%2Fisdn%2Fdivert%2Fisdn_divert.c;h=70cf6bac7a5aa1041cfa6067df7a62c1964debd5;hp=1eb112213f0c357d7cb758f4162d3ba1e5322a42;hb=5a0e3ad6af8660be21ca98a971cd00f331318c05;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c index 1eb1122..70cf6ba 100644 --- a/drivers/isdn/divert/isdn_divert.c +++ b/drivers/isdn/divert/isdn_divert.c @@ -9,8 +9,10 @@ * */ -#include #include +#include +#include +#include #include "isdn_divert.h" @@ -152,7 +154,7 @@ int cf_command(int drvid, int mode, *ielenp = p - ielenp - 1; /* set total IE length */ /* allocate mem for information struct */ - if (!(cs = (struct call_struc *) kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) + if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) return(-ENOMEM); /* no memory */ init_timer(&cs->timer); cs->info[0] = '\0'; @@ -182,7 +184,7 @@ int cf_command(int drvid, int mode, (mode != 1) ? "" : " 0 ", (mode != 1) ? "" : fwd_nr); - retval = divert_if.ll_cmd(&cs->ics); /* excute command */ + retval = divert_if.ll_cmd(&cs->ics); /* execute command */ if (!retval) { cs->prev = NULL; @@ -275,7 +277,7 @@ int insertrule(int idx, divert_rule *newrule) { struct deflect_struc *ds,*ds1=NULL; unsigned long flags; - if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc), + if (!(ds = kmalloc(sizeof(struct deflect_struc), GFP_KERNEL))) return(-ENOMEM); /* no memory */ @@ -383,7 +385,7 @@ divert_rule *getruleptr(int idx) /*************************************************/ /* called from common module on an incoming call */ /*************************************************/ -int isdn_divert_icall(isdn_ctrl *ic) +static int isdn_divert_icall(isdn_ctrl *ic) { int retval = 0; unsigned long flags; struct call_struc *cs = NULL; @@ -450,7 +452,7 @@ int isdn_divert_icall(isdn_ctrl *ic) if (dv->rule.action == DEFLECT_PROCEED) if ((!if_used) || ((!extern_wait_max) && (!dv->rule.waittime))) return(0); /* no external deflection needed */ - if (!(cs = (struct call_struc *) kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) + if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) return(0); /* no memory */ init_timer(&cs->timer); cs->info[0] = '\0'; @@ -552,7 +554,7 @@ void deleteprocs(void) /****************************************************/ /* put a address including address type into buffer */ /****************************************************/ -int put_address(char *st, u_char *p, int len) +static int put_address(char *st, u_char *p, int len) { u_char retval = 0; u_char adr_typ = 0; /* network standard */ @@ -593,9 +595,9 @@ int put_address(char *st, u_char *p, int len) } /* put_address */ /*************************************/ -/* report a succesfull interrogation */ +/* report a successful interrogation */ /*************************************/ -int interrogate_success(isdn_ctrl *ic, struct call_struc *cs) +static int interrogate_success(isdn_ctrl *ic, struct call_struc *cs) { char *src = ic->parm.dss1_io.data; int restlen = ic->parm.dss1_io.datalen; int cnt = 1; @@ -689,7 +691,7 @@ int interrogate_success(isdn_ctrl *ic, struct call_struc *cs) /*********************************************/ /* callback for protocol specific extensions */ /*********************************************/ -int prot_stat_callback(isdn_ctrl *ic) +static int prot_stat_callback(isdn_ctrl *ic) { struct call_struc *cs, *cs1; int i; unsigned long flags; @@ -781,7 +783,7 @@ int prot_stat_callback(isdn_ctrl *ic) /***************************/ /* status callback from HL */ /***************************/ -int isdn_divert_stat_callback(isdn_ctrl *ic) +static int isdn_divert_stat_callback(isdn_ctrl *ic) { struct call_struc *cs, *cs1; unsigned long flags; int retval;