Commit 248c1097 authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN cleanup: drivers/isdn/capi s/__u{32,16,8}/u{32,16,8}/

parent 9dbf0015
This diff is collapsed.
...@@ -27,12 +27,12 @@ MODULE_LICENSE("GPL"); ...@@ -27,12 +27,12 @@ MODULE_LICENSE("GPL");
/* from CAPI2.0 DDK AVM Berlin GmbH */ /* from CAPI2.0 DDK AVM Berlin GmbH */
#ifndef CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON #ifndef CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON
char *capi_info2str(__u16 reason) char *capi_info2str(u16 reason)
{ {
return ".."; return "..";
} }
#else #else
char *capi_info2str(__u16 reason) char *capi_info2str(u16 reason)
{ {
switch (reason) { switch (reason) {
...@@ -422,14 +422,14 @@ static unsigned char *cpars[] = ...@@ -422,14 +422,14 @@ static unsigned char *cpars[] =
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
#define byteTLcpy(x,y) *(__u8 *)(x)=*(__u8 *)(y); #define byteTLcpy(x,y) *(u8 *)(x)=*(u8 *)(y);
#define wordTLcpy(x,y) *(__u16 *)(x)=*(__u16 *)(y); #define wordTLcpy(x,y) *(u16 *)(x)=*(u16 *)(y);
#define dwordTLcpy(x,y) memcpy(x,y,4); #define dwordTLcpy(x,y) memcpy(x,y,4);
#define structTLcpy(x,y,l) memcpy (x,y,l) #define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l) #define structTLcpyovl(x,y,l) memmove (x,y,l)
#define byteTRcpy(x,y) *(__u8 *)(y)=*(__u8 *)(x); #define byteTRcpy(x,y) *(u8 *)(y)=*(u8 *)(x);
#define wordTRcpy(x,y) *(__u16 *)(y)=*(__u16 *)(x); #define wordTRcpy(x,y) *(u16 *)(y)=*(u16 *)(x);
#define dwordTRcpy(x,y) memcpy(y,x,4); #define dwordTRcpy(x,y) memcpy(y,x,4);
#define structTRcpy(x,y,l) memcpy (y,x,l) #define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l) #define structTRcpyovl(x,y,l) memmove (y,x,l)
...@@ -449,7 +449,7 @@ static unsigned command_2_index(unsigned c, unsigned sc) ...@@ -449,7 +449,7 @@ static unsigned command_2_index(unsigned c, unsigned sc)
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
#define TYP (cdef[cmsg->par[cmsg->p]].typ) #define TYP (cdef[cmsg->par[cmsg->p]].typ)
#define OFF (((__u8 *)cmsg)+cdef[cmsg->par[cmsg->p]].off) #define OFF (((u8 *)cmsg)+cdef[cmsg->par[cmsg->p]].off)
static void jumpcstruct(_cmsg * cmsg) static void jumpcstruct(_cmsg * cmsg)
{ {
...@@ -486,7 +486,7 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -486,7 +486,7 @@ static void pars_2_message(_cmsg * cmsg)
cmsg->l += 4; cmsg->l += 4;
break; break;
case _CSTRUCT: case _CSTRUCT:
if (*(__u8 **) OFF == 0) { if (*(u8 **) OFF == 0) {
*(cmsg->m + cmsg->l) = '\0'; *(cmsg->m + cmsg->l) = '\0';
cmsg->l++; cmsg->l++;
} else if (**(_cstruct *) OFF != 0xff) { } else if (**(_cstruct *) OFF != 0xff) {
...@@ -494,8 +494,8 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -494,8 +494,8 @@ static void pars_2_message(_cmsg * cmsg)
cmsg->l += 1 + **(_cstruct *) OFF; cmsg->l += 1 + **(_cstruct *) OFF;
} else { } else {
_cstruct s = *(_cstruct *) OFF; _cstruct s = *(_cstruct *) OFF;
structTLcpy(cmsg->m + cmsg->l, s, 3 + *(__u16 *) (s + 1)); structTLcpy(cmsg->m + cmsg->l, s, 3 + *(u16 *) (s + 1));
cmsg->l += 3 + *(__u16 *) (s + 1); cmsg->l += 3 + *(u16 *) (s + 1);
} }
break; break;
case _CMSTRUCT: case _CMSTRUCT:
...@@ -514,7 +514,7 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -514,7 +514,7 @@ static void pars_2_message(_cmsg * cmsg)
pars_2_message(cmsg); pars_2_message(cmsg);
_ls = cmsg->l - _l - 1; _ls = cmsg->l - _l - 1;
if (_ls < 255) if (_ls < 255)
(cmsg->m + _l)[0] = (__u8) _ls; (cmsg->m + _l)[0] = (u8) _ls;
else { else {
structTLcpyovl(cmsg->m + _l + 3, cmsg->m + _l + 1, _ls); structTLcpyovl(cmsg->m + _l + 3, cmsg->m + _l + 1, _ls);
(cmsg->m + _l)[0] = 0xff; (cmsg->m + _l)[0] = 0xff;
...@@ -527,7 +527,7 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -527,7 +527,7 @@ static void pars_2_message(_cmsg * cmsg)
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
unsigned capi_cmsg2message(_cmsg * cmsg, __u8 * msg) unsigned capi_cmsg2message(_cmsg * cmsg, u8 * msg)
{ {
cmsg->m = msg; cmsg->m = msg;
cmsg->l = 8; cmsg->l = 8;
...@@ -564,12 +564,12 @@ static void message_2_pars(_cmsg * cmsg) ...@@ -564,12 +564,12 @@ static void message_2_pars(_cmsg * cmsg)
cmsg->l += 4; cmsg->l += 4;
break; break;
case _CSTRUCT: case _CSTRUCT:
*(__u8 **) OFF = cmsg->m + cmsg->l; *(u8 **) OFF = cmsg->m + cmsg->l;
if (cmsg->m[cmsg->l] != 0xff) if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l]; cmsg->l += 1 + cmsg->m[cmsg->l];
else else
cmsg->l += 3 + *(__u16 *) (cmsg->m + cmsg->l + 1); cmsg->l += 3 + *(u16 *) (cmsg->m + cmsg->l + 1);
break; break;
case _CMSTRUCT: case _CMSTRUCT:
/*----- Metastruktur 0 -----*/ /*----- Metastruktur 0 -----*/
...@@ -590,7 +590,7 @@ static void message_2_pars(_cmsg * cmsg) ...@@ -590,7 +590,7 @@ static void message_2_pars(_cmsg * cmsg)
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg) unsigned capi_message2cmsg(_cmsg * cmsg, u8 * msg)
{ {
memset(cmsg, 0, sizeof(_cmsg)); memset(cmsg, 0, sizeof(_cmsg));
cmsg->m = msg; cmsg->m = msg;
...@@ -610,9 +610,9 @@ unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg) ...@@ -610,9 +610,9 @@ unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg)
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
unsigned capi_cmsg_header(_cmsg * cmsg, __u16 _ApplId, unsigned capi_cmsg_header(_cmsg * cmsg, u16 _ApplId,
__u8 _Command, __u8 _Subcommand, u8 _Command, u8 _Subcommand,
__u16 _Messagenumber, __u32 _Controller) u16 _Messagenumber, u32 _Controller)
{ {
memset(cmsg, 0, sizeof(_cmsg)); memset(cmsg, 0, sizeof(_cmsg));
cmsg->ApplId = _ApplId; cmsg->ApplId = _ApplId;
...@@ -708,7 +708,7 @@ static char *mnames[] = ...@@ -708,7 +708,7 @@ static char *mnames[] =
"MANUFACTURER_RESP" "MANUFACTURER_RESP"
}; };
char *capi_cmd2str(__u8 cmd, __u8 subcmd) char *capi_cmd2str(u8 cmd, u8 subcmd)
{ {
return mnames[command_2_index(cmd, subcmd)]; return mnames[command_2_index(cmd, subcmd)];
} }
...@@ -785,7 +785,7 @@ static void bufprint(char *fmt,...) ...@@ -785,7 +785,7 @@ static void bufprint(char *fmt,...)
p += strlen(p); p += strlen(p);
} }
static void printstructlen(__u8 * m, unsigned len) static void printstructlen(u8 * m, unsigned len)
{ {
unsigned hex = 0; unsigned hex = 0;
for (; len; len--, m++) for (; len; len--, m++)
...@@ -805,14 +805,14 @@ static void printstructlen(__u8 * m, unsigned len) ...@@ -805,14 +805,14 @@ static void printstructlen(__u8 * m, unsigned len)
bufprint(">"); bufprint(">");
} }
static void printstruct(__u8 * m) static void printstruct(u8 * m)
{ {
unsigned len; unsigned len;
if (m[0] != 0xff) { if (m[0] != 0xff) {
len = m[0]; len = m[0];
m += 1; m += 1;
} else { } else {
len = ((__u16 *) (m + 1))[0]; len = ((u16 *) (m + 1))[0];
m += 3; m += 3;
} }
printstructlen(m, len); printstructlen(m, len);
...@@ -833,15 +833,15 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level) ...@@ -833,15 +833,15 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
switch (TYP) { switch (TYP) {
case _CBYTE: case _CBYTE:
bufprint("%-*s = 0x%x\n", slen, NAME, *(__u8 *) (cmsg->m + cmsg->l)); bufprint("%-*s = 0x%x\n", slen, NAME, *(u8 *) (cmsg->m + cmsg->l));
cmsg->l++; cmsg->l++;
break; break;
case _CWORD: case _CWORD:
bufprint("%-*s = 0x%x\n", slen, NAME, *(__u16 *) (cmsg->m + cmsg->l)); bufprint("%-*s = 0x%x\n", slen, NAME, *(u16 *) (cmsg->m + cmsg->l));
cmsg->l += 2; cmsg->l += 2;
break; break;
case _CDWORD: case _CDWORD:
bufprint("%-*s = 0x%lx\n", slen, NAME, *(__u32 *) (cmsg->m + cmsg->l)); bufprint("%-*s = 0x%lx\n", slen, NAME, *(u32 *) (cmsg->m + cmsg->l));
cmsg->l += 4; cmsg->l += 4;
break; break;
case _CSTRUCT: case _CSTRUCT:
...@@ -854,7 +854,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level) ...@@ -854,7 +854,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
if (cmsg->m[cmsg->l] != 0xff) if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l]; cmsg->l += 1 + cmsg->m[cmsg->l];
else else
cmsg->l += 3 + *(__u16 *) (cmsg->m + cmsg->l + 1); cmsg->l += 3 + *(u16 *) (cmsg->m + cmsg->l + 1);
break; break;
...@@ -877,7 +877,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level) ...@@ -877,7 +877,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
} }
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
char *capi_message2str(__u8 * msg) char *capi_message2str(u8 * msg)
{ {
_cmsg cmsg; _cmsg cmsg;
...@@ -909,9 +909,9 @@ char *capi_cmsg2str(_cmsg * cmsg) ...@@ -909,9 +909,9 @@ char *capi_cmsg2str(_cmsg * cmsg)
cmsg->p = 0; cmsg->p = 0;
bufprint("%s ID=%03d #0x%04x LEN=%04d\n", bufprint("%s ID=%03d #0x%04x LEN=%04d\n",
mnames[command_2_index(cmsg->Command, cmsg->Subcommand)], mnames[command_2_index(cmsg->Command, cmsg->Subcommand)],
((__u16 *) cmsg->m)[1], ((u16 *) cmsg->m)[1],
((__u16 *) cmsg->m)[3], ((u16 *) cmsg->m)[3],
((__u16 *) cmsg->m)[0]); ((u16 *) cmsg->m)[0]);
protocol_message_2_pars(cmsg, 1); protocol_message_2_pars(cmsg, 1);
return buf; return buf;
} }
......
...@@ -54,14 +54,14 @@ MODULE_PARM(showcapimsgs, "i"); ...@@ -54,14 +54,14 @@ MODULE_PARM(showcapimsgs, "i");
struct msgidqueue { struct msgidqueue {
struct msgidqueue *next; struct msgidqueue *next;
__u16 msgid; u16 msgid;
}; };
struct capi_ncci { struct capi_ncci {
struct capi_ncci *next; struct capi_ncci *next;
__u16 applid; u16 applid;
__u32 ncci; u32 ncci;
__u32 winsize; u32 winsize;
int nmsg; int nmsg;
struct msgidqueue *msgidqueue; struct msgidqueue *msgidqueue;
struct msgidqueue *msgidlast; struct msgidqueue *msgidlast;
...@@ -70,11 +70,11 @@ struct capi_ncci { ...@@ -70,11 +70,11 @@ struct capi_ncci {
}; };
struct capi_appl { struct capi_appl {
__u16 applid; u16 applid;
capi_register_params rparam; capi_register_params rparam;
int releasing; int releasing;
void *param; void *param;
void (*signal) (__u16 applid, void *param); void (*signal) (u16 applid, void *param);
struct sk_buff_head recv_queue; struct sk_buff_head recv_queue;
int nncci; int nncci;
struct capi_ncci *nccilist; struct capi_ncci *nccilist;
...@@ -88,9 +88,9 @@ struct capi_appl { ...@@ -88,9 +88,9 @@ struct capi_appl {
struct capi_notifier { struct capi_notifier {
struct capi_notifier *next; struct capi_notifier *next;
unsigned int cmd; unsigned int cmd;
__u32 controller; u32 controller;
__u16 applid; u16 applid;
__u32 ncci; u32 ncci;
}; };
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -136,7 +136,7 @@ static char *cardstate2str(unsigned short cardstate) ...@@ -136,7 +136,7 @@ static char *cardstate2str(unsigned short cardstate)
} }
} }
static inline int capi_cmd_valid(__u8 cmd) static inline int capi_cmd_valid(u8 cmd)
{ {
switch (cmd) { switch (cmd) {
case CAPI_ALERT: case CAPI_ALERT:
...@@ -159,7 +159,7 @@ static inline int capi_cmd_valid(__u8 cmd) ...@@ -159,7 +159,7 @@ static inline int capi_cmd_valid(__u8 cmd)
return 0; return 0;
} }
static inline int capi_subcmd_valid(__u8 subcmd) static inline int capi_subcmd_valid(u8 subcmd)
{ {
switch (subcmd) { switch (subcmd) {
case CAPI_REQ: case CAPI_REQ:
...@@ -511,8 +511,8 @@ static inline struct capi_notifier *notify_dequeue(void) ...@@ -511,8 +511,8 @@ static inline struct capi_notifier *notify_dequeue(void)
return np; return np;
} }
static int notify_push(unsigned int cmd, __u32 controller, static int notify_push(unsigned int cmd, u32 controller,
__u16 applid, __u32 ncci) u16 applid, u32 ncci)
{ {
struct capi_notifier *np; struct capi_notifier *np;
...@@ -541,7 +541,7 @@ static int notify_push(unsigned int cmd, __u32 controller, ...@@ -541,7 +541,7 @@ static int notify_push(unsigned int cmd, __u32 controller,
/* -------- KCI_CONTRUP --------------------------------------- */ /* -------- KCI_CONTRUP --------------------------------------- */
static void notify_up(__u32 contr) static void notify_up(u32 contr)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
...@@ -556,7 +556,7 @@ static void notify_up(__u32 contr) ...@@ -556,7 +556,7 @@ static void notify_up(__u32 contr)
/* -------- KCI_CONTRDOWN ------------------------------------- */ /* -------- KCI_CONTRDOWN ------------------------------------- */
static void notify_down(__u32 contr) static void notify_down(u32 contr)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
printk(KERN_NOTICE "kcapi: notify down contr %d\n", contr); printk(KERN_NOTICE "kcapi: notify down contr %d\n", contr);
...@@ -570,7 +570,7 @@ static void notify_down(__u32 contr) ...@@ -570,7 +570,7 @@ static void notify_down(__u32 contr)
/* -------- KCI_NCCIUP ---------------------------------------- */ /* -------- KCI_NCCIUP ---------------------------------------- */
static void notify_ncciup(__u32 contr, __u16 applid, __u32 ncci) static void notify_ncciup(u32 contr, u16 applid, u32 ncci)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
struct capi_ncciinfo n; struct capi_ncciinfo n;
...@@ -587,7 +587,7 @@ static void notify_ncciup(__u32 contr, __u16 applid, __u32 ncci) ...@@ -587,7 +587,7 @@ static void notify_ncciup(__u32 contr, __u16 applid, __u32 ncci)
/* -------- KCI_NCCIDOWN -------------------------------------- */ /* -------- KCI_NCCIDOWN -------------------------------------- */
static void notify_nccidown(__u32 contr, __u16 applid, __u32 ncci) static void notify_nccidown(u32 contr, u16 applid, u32 ncci)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
struct capi_ncciinfo n; struct capi_ncciinfo n;
...@@ -650,7 +650,7 @@ static inline void mq_init(struct capi_ncci * np) ...@@ -650,7 +650,7 @@ static inline void mq_init(struct capi_ncci * np)
} }
} }
static inline int mq_enqueue(struct capi_ncci * np, __u16 msgid) static inline int mq_enqueue(struct capi_ncci * np, u16 msgid)
{ {
struct msgidqueue *mq; struct msgidqueue *mq;
if ((mq = np->msgidfree) == 0) if ((mq = np->msgidfree) == 0)
...@@ -667,7 +667,7 @@ static inline int mq_enqueue(struct capi_ncci * np, __u16 msgid) ...@@ -667,7 +667,7 @@ static inline int mq_enqueue(struct capi_ncci * np, __u16 msgid)
return 1; return 1;
} }
static inline int mq_dequeue(struct capi_ncci * np, __u16 msgid) static inline int mq_dequeue(struct capi_ncci * np, u16 msgid)
{ {
struct msgidqueue **pp; struct msgidqueue **pp;
for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) { for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) {
...@@ -685,11 +685,11 @@ static inline int mq_dequeue(struct capi_ncci * np, __u16 msgid) ...@@ -685,11 +685,11 @@ static inline int mq_dequeue(struct capi_ncci * np, __u16 msgid)
return 0; return 0;
} }
static void controllercb_appl_registered(struct capi_ctr * card, __u16 appl) static void controllercb_appl_registered(struct capi_ctr * card, u16 appl)
{ {
} }
static void controllercb_appl_released(struct capi_ctr * card, __u16 appl) static void controllercb_appl_released(struct capi_ctr * card, u16 appl)
{ {
struct capi_ncci **pp, **nextpp; struct capi_ncci **pp, **nextpp;
for (pp = &APPL(appl)->nccilist; *pp; pp = nextpp) { for (pp = &APPL(appl)->nccilist; *pp; pp = nextpp) {
...@@ -716,7 +716,7 @@ static void controllercb_appl_released(struct capi_ctr * card, __u16 appl) ...@@ -716,7 +716,7 @@ static void controllercb_appl_released(struct capi_ctr * card, __u16 appl)
*/ */
static void controllercb_new_ncci(struct capi_ctr * card, static void controllercb_new_ncci(struct capi_ctr * card,
__u16 appl, __u32 ncci, __u32 winsize) u16 appl, u32 ncci, u32 winsize)
{ {
struct capi_ncci *np; struct capi_ncci *np;
if (!VALID_APPLID(appl)) { if (!VALID_APPLID(appl)) {
...@@ -745,7 +745,7 @@ static void controllercb_new_ncci(struct capi_ctr * card, ...@@ -745,7 +745,7 @@ static void controllercb_new_ncci(struct capi_ctr * card,
} }
static void controllercb_free_ncci(struct capi_ctr * card, static void controllercb_free_ncci(struct capi_ctr * card,
__u16 appl, __u32 ncci) u16 appl, u32 ncci)
{ {
struct capi_ncci **pp; struct capi_ncci **pp;
if (!VALID_APPLID(appl)) { if (!VALID_APPLID(appl)) {
...@@ -767,7 +767,7 @@ static void controllercb_free_ncci(struct capi_ctr * card, ...@@ -767,7 +767,7 @@ static void controllercb_free_ncci(struct capi_ctr * card,
} }
static struct capi_ncci *find_ncci(struct capi_appl * app, __u32 ncci) static struct capi_ncci *find_ncci(struct capi_appl * app, u32 ncci)
{ {
struct capi_ncci *np; struct capi_ncci *np;
for (np = app->nccilist; np; np = np->next) { for (np = app->nccilist; np; np = np->next) {
...@@ -784,7 +784,7 @@ static void recv_handler(void *dummy) ...@@ -784,7 +784,7 @@ static void recv_handler(void *dummy)
struct sk_buff *skb; struct sk_buff *skb;
while ((skb = skb_dequeue(&recv_queue)) != 0) { while ((skb = skb_dequeue(&recv_queue)) != 0) {
__u16 appl = CAPIMSG_APPID(skb->data); u16 appl = CAPIMSG_APPID(skb->data);
struct capi_ncci *np; struct capi_ncci *np;
if (!VALID_APPLID(appl)) { if (!VALID_APPLID(appl)) {
printk(KERN_ERR "kcapi: recv_handler: applid %d ? (%s)\n", printk(KERN_ERR "kcapi: recv_handler: applid %d ? (%s)\n",
...@@ -817,10 +817,10 @@ static void recv_handler(void *dummy) ...@@ -817,10 +817,10 @@ static void recv_handler(void *dummy)
} }
static void controllercb_handle_capimsg(struct capi_ctr * card, static void controllercb_handle_capimsg(struct capi_ctr * card,
__u16 appl, struct sk_buff *skb) u16 appl, struct sk_buff *skb)
{ {
int showctl = 0; int showctl = 0;
__u8 cmd, subcmd; u8 cmd, subcmd;
if (card->cardstate != CARD_RUNNING) { if (card->cardstate != CARD_RUNNING) {
printk(KERN_INFO "kcapi: controller %d not active, got: %s", printk(KERN_INFO "kcapi: controller %d not active, got: %s",
...@@ -862,7 +862,7 @@ static void controllercb_handle_capimsg(struct capi_ctr * card, ...@@ -862,7 +862,7 @@ static void controllercb_handle_capimsg(struct capi_ctr * card,
static void controllercb_ready(struct capi_ctr * card) static void controllercb_ready(struct capi_ctr * card)
{ {
__u16 appl; u16 appl;
card->cardstate = CARD_RUNNING; card->cardstate = CARD_RUNNING;
...@@ -880,7 +880,7 @@ static void controllercb_ready(struct capi_ctr * card) ...@@ -880,7 +880,7 @@ static void controllercb_ready(struct capi_ctr * card)
static void controllercb_reseted(struct capi_ctr * card) static void controllercb_reseted(struct capi_ctr * card)
{ {
__u16 appl; u16 appl;
if (card->cardstate == CARD_FREE) if (card->cardstate == CARD_FREE)
return; return;
...@@ -1088,7 +1088,7 @@ void detach_capi_driver(struct capi_driver *driver) ...@@ -1088,7 +1088,7 @@ void detach_capi_driver(struct capi_driver *driver)
/* -------- CAPI2.0 Interface ---------------------------------- */ /* -------- CAPI2.0 Interface ---------------------------------- */
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static __u16 capi_isinstalled(void) static u16 capi_isinstalled(void)
{ {
int i; int i;
for (i = 0; i < CAPI_MAXCONTR; i++) { for (i = 0; i < CAPI_MAXCONTR; i++) {
...@@ -1098,7 +1098,7 @@ static __u16 capi_isinstalled(void) ...@@ -1098,7 +1098,7 @@ static __u16 capi_isinstalled(void)
return CAPI_REGNOTINSTALLED; return CAPI_REGNOTINSTALLED;
} }
static __u16 capi_register(capi_register_params * rparam, __u16 * applidp) static u16 capi_register(capi_register_params * rparam, u16 * applidp)
{ {
int appl; int appl;
int i; int i;
...@@ -1131,7 +1131,7 @@ static __u16 capi_register(capi_register_params * rparam, __u16 * applidp) ...@@ -1131,7 +1131,7 @@ static __u16 capi_register(capi_register_params * rparam, __u16 * applidp)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_release(__u16 applid) static u16 capi_release(u16 applid)
{ {
int i; int i;
...@@ -1154,12 +1154,12 @@ static __u16 capi_release(__u16 applid) ...@@ -1154,12 +1154,12 @@ static __u16 capi_release(__u16 applid)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_put_message(__u16 applid, struct sk_buff *skb) static u16 capi_put_message(u16 applid, struct sk_buff *skb)
{ {
struct capi_ncci *np; struct capi_ncci *np;
__u32 contr; u32 contr;
int showctl = 0; int showctl = 0;
__u8 cmd, subcmd; u8 cmd, subcmd;
if (ncards == 0) if (ncards == 0)
return CAPI_REGNOTINSTALLED; return CAPI_REGNOTINSTALLED;
...@@ -1212,7 +1212,7 @@ static __u16 capi_put_message(__u16 applid, struct sk_buff *skb) ...@@ -1212,7 +1212,7 @@ static __u16 capi_put_message(__u16 applid, struct sk_buff *skb)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_message(__u16 applid, struct sk_buff **msgp) static u16 capi_get_message(u16 applid, struct sk_buff **msgp)
{ {
struct sk_buff *skb; struct sk_buff *skb;
...@@ -1224,8 +1224,8 @@ static __u16 capi_get_message(__u16 applid, struct sk_buff **msgp) ...@@ -1224,8 +1224,8 @@ static __u16 capi_get_message(__u16 applid, struct sk_buff **msgp)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_set_signal(__u16 applid, static u16 capi_set_signal(u16 applid,
void (*signal) (__u16 applid, void *param), void (*signal) (u16 applid, void *param),
void *param) void *param)
{ {
if (!VALID_APPLID(applid)) if (!VALID_APPLID(applid))
...@@ -1235,7 +1235,7 @@ static __u16 capi_set_signal(__u16 applid, ...@@ -1235,7 +1235,7 @@ static __u16 capi_set_signal(__u16 applid,
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]) static u16 capi_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN])
{ {
if (contr == 0) { if (contr == 0) {
strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN); strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
...@@ -1248,7 +1248,7 @@ static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]) ...@@ -1248,7 +1248,7 @@ static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN])
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_version(__u32 contr, struct capi_version *verp) static u16 capi_get_version(u32 contr, struct capi_version *verp)
{ {
if (contr == 0) { if (contr == 0) {
*verp = driver_version; *verp = driver_version;
...@@ -1261,7 +1261,7 @@ static __u16 capi_get_version(__u32 contr, struct capi_version *verp) ...@@ -1261,7 +1261,7 @@ static __u16 capi_get_version(__u32 contr, struct capi_version *verp)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN]) static u16 capi_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN])
{ {
if (contr == 0) { if (contr == 0) {
strncpy(serial, driver_serial, CAPI_SERIAL_LEN); strncpy(serial, driver_serial, CAPI_SERIAL_LEN);
...@@ -1274,7 +1274,7 @@ static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN]) ...@@ -1274,7 +1274,7 @@ static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN])
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_profile(__u32 contr, struct capi_profile *profp) static u16 capi_get_profile(u32 contr, struct capi_profile *profp)
{ {
if (contr == 0) { if (contr == 0) {
profp->ncontroller = ncards; profp->ncontroller = ncards;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment