printk(KERN_ERR "capi: alloc datahandle failed\n");
return -1;
}
- n->next = 0;
+ n->next = NULL;
n->datahandle = datahandle;
for (pp = &mp->ackqueue; *pp; pp = &(*pp)->next) ;
*pp = n;
mp = kmalloc(sizeof(*mp), GFP_ATOMIC);
if (!mp) {
printk(KERN_ERR "capi: can't alloc capiminor\n");
- return 0;
+ return NULL;
}
memset(mp, 0, sizeof(struct capiminor));
if (!(minor < capi_ttyminors)) {
printk(KERN_NOTICE "capi: out of minors\n");
kfree(mp);
- return 0;
+ return NULL;
}
return mp;
write_unlock_irqrestore(&capiminor_list_lock, flags);
if (mp->ttyskb) kfree_skb(mp->ttyskb);
- mp->ttyskb = 0;
+ mp->ttyskb = NULL;
skb_queue_purge(&mp->inqueue);
skb_queue_purge(&mp->outqueue);
capiminor_del_all_ack(mp);
{
struct capincci *np, **pp;
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
- struct capiminor *mp = 0;
+ struct capiminor *mp = NULL;
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
np = kmalloc(sizeof(*np), GFP_ATOMIC);
if (!np)
- return 0;
+ return NULL;
memset(np, 0, sizeof(struct capincci));
np->ncci = ncci;
np->cdev = cdev;
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
- mp = 0;
+ mp = NULL;
if (cdev->userflags & CAPIFLAG_HIGHJACKING)
mp = np->minorp = capiminor_alloc(&cdev->ap, ncci);
if (mp) {
capifs_free_ncci(mp->minor);
#endif
if (mp->tty) {
- mp->nccip = 0;
+ mp->nccip = NULL;
#ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "reset mp->nccip\n");
#endif
cdev = kmalloc(sizeof(*cdev), GFP_KERNEL);
if (!cdev)
- return 0;
+ return NULL;
memset(cdev, 0, sizeof(struct capidev));
init_MUTEX(&cdev->ncci_list_sem);
printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => ldisc\n",
datahandle, skb->len);
#endif
- mp->tty->ldisc.receive_buf(mp->tty, skb->data, 0, skb->len);
+ mp->tty->ldisc.receive_buf(mp->tty, skb->data, NULL, skb->len);
kfree_skb(skb);
return 0;
#ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "capinc_tty_close lastclose\n");
#endif
- tty->driver_data = (void *)0;
- mp->tty = 0;
+ tty->driver_data = NULL;
+ mp->tty = NULL;
}
#ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount));
skb = mp->ttyskb;
if (skb) {
- mp->ttyskb = 0;
+ mp->ttyskb = NULL;
skb_queue_tail(&mp->outqueue, skb);
mp->outbytes += skb->len;
}
skb_reserve(skb, CAPI_DATA_B3_REQ_LEN);
if (from_user) {
- if ((retval = copy_from_user(skb_put(skb, count), buf, count))) {
+ retval = copy_from_user(skb_put(skb, count), buf, count);
+ if (retval) {
kfree_skb(skb);
#ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_write: copy_from_user=%d\n", retval);
*(skb_put(skb, 1)) = ch;
return;
}
- mp->ttyskb = 0;
+ mp->ttyskb = NULL;
skb_queue_tail(&mp->outqueue, skb);
mp->outbytes += skb->len;
(void)handle_minor_send(mp);
skb = mp->ttyskb;
if (skb) {
- mp->ttyskb = 0;
+ mp->ttyskb = NULL;
skb_queue_tail(&mp->outqueue, skb);
mp->outbytes += skb->len;
(void)handle_minor_send(mp);
for (i=0; i < nelem; i++) {
struct procfsentries *p = procfsentries + i;
- p->procent = create_proc_entry(p->name, p->mode, 0);
+ p->procent = create_proc_entry(p->name, p->mode, NULL);
if (p->procent) p->procent->read_proc = p->read_proc;
}
}
for (i=nelem-1; i >= 0; i--) {
struct procfsentries *p = procfsentries + i;
if (p->procent) {
- remove_proc_entry(p->name, 0);
- p->procent = 0;
+ remove_proc_entry(p->name, NULL);
+ p->procent = NULL;
}
}
}
case ISDN_PROTO_L2_HDLC:
case ISDN_PROTO_L2_TRANS:
default:
- return 0;
+ return NULL;
case ISDN_PROTO_L2_V11096:
return b1config_async_v110(9600);
case ISDN_PROTO_L2_V11019:
plcip = (capidrv_plci *) kmalloc(sizeof(capidrv_plci), GFP_ATOMIC);
if (plcip == 0)
- return 0;
+ return NULL;
memset(plcip, 0, sizeof(capidrv_plci));
plcip->state = ST_PLCI_NONE;
for (p = card->plci_list; p; p = p->next)
if (p->plci == plci)
return p;
- return 0;
+ return NULL;
}
static capidrv_plci *find_plci_by_msgid(capidrv_contr * card, u16 msgid)
for (p = card->plci_list; p; p = p->next)
if (p->msgid == msgid)
return p;
- return 0;
+ return NULL;
}
static capidrv_plci *find_plci_by_ncci(capidrv_contr * card, u32 ncci)
for (p = card->plci_list; p; p = p->next)
if (p->plci == (ncci & 0xffff))
return p;
- return 0;
+ return NULL;
}
static void free_plci(capidrv_contr * card, capidrv_plci * plcip)
for (pp = &card->plci_list; *pp; pp = &(*pp)->next) {
if (*pp == plcip) {
*pp = (*pp)->next;
- card->bchans[plcip->chan].plcip = 0;
+ card->bchans[plcip->chan].plcip = NULL;
card->bchans[plcip->chan].disconnecting = 0;
card->bchans[plcip->chan].incoming = 0;
kfree(plcip);
nccip = (capidrv_ncci *) kmalloc(sizeof(capidrv_ncci), GFP_ATOMIC);
if (nccip == 0)
- return 0;
+ return NULL;
memset(nccip, 0, sizeof(capidrv_ncci));
nccip->ncci = ncci;
capidrv_ncci *p;
if ((plcip = find_plci_by_ncci(card, ncci)) == 0)
- return 0;
+ return NULL;
for (p = plcip->ncci_list; p; p = p->next)
if (p->ncci == ncci)
return p;
- return 0;
+ return NULL;
}
static inline capidrv_ncci *find_ncci_by_msgid(capidrv_contr * card,
capidrv_ncci *p;
if ((plcip = find_plci_by_ncci(card, ncci)) == 0)
- return 0;
+ return NULL;
for (p = plcip->ncci_list; p; p = p->next)
if (p->msgid == msgid)
return p;
- return 0;
+ return NULL;
}
static void free_ncci(capidrv_contr * card, struct capidrv_ncci *nccip)
break;
}
}
- card->bchans[nccip->chan].nccip = 0;
+ card->bchans[nccip->chan].nccip = NULL;
kfree(nccip);
}
printk(KERN_ERR "capidrv: kmalloc ncci_datahandle failed\n");
return -1;
}
- n->next = 0;
+ n->next = NULL;
n->datahandle = datahandle;
n->len = len;
for (pp = &nccip->ackqueue; *pp; pp = &(*pp)->next) ;
{
isdn_ctrl cmd;
- card->bchans[plci->chan].contr = 0;
+ card->bchans[plci->chan].contr = NULL;
cmd.command = ISDN_STAT_DHUP;
cmd.driver = card->myid;
cmd.arg = plci->chan;
static struct plcistatechange plcitable[] =
{
/* P-0 */
- {ST_PLCI_NONE, ST_PLCI_OUTGOING, EV_PLCI_CONNECT_REQ, 0},
- {ST_PLCI_NONE, ST_PLCI_ALLOCATED, EV_PLCI_FACILITY_IND_UP, 0},
- {ST_PLCI_NONE, ST_PLCI_INCOMING, EV_PLCI_CONNECT_IND, 0},
- {ST_PLCI_NONE, ST_PLCI_RESUMEING, EV_PLCI_RESUME_REQ, 0},
+ {ST_PLCI_NONE, ST_PLCI_OUTGOING, EV_PLCI_CONNECT_REQ, NULL},
+ {ST_PLCI_NONE, ST_PLCI_ALLOCATED, EV_PLCI_FACILITY_IND_UP, NULL},
+ {ST_PLCI_NONE, ST_PLCI_INCOMING, EV_PLCI_CONNECT_IND, NULL},
+ {ST_PLCI_NONE, ST_PLCI_RESUMEING, EV_PLCI_RESUME_REQ, NULL},
/* P-0.1 */
{ST_PLCI_OUTGOING, ST_PLCI_NONE, EV_PLCI_CONNECT_CONF_ERROR, p0},
- {ST_PLCI_OUTGOING, ST_PLCI_ALLOCATED, EV_PLCI_CONNECT_CONF_OK, 0},
+ {ST_PLCI_OUTGOING, ST_PLCI_ALLOCATED, EV_PLCI_CONNECT_CONF_OK, NULL},
/* P-1 */
- {ST_PLCI_ALLOCATED, ST_PLCI_ACTIVE, EV_PLCI_CONNECT_ACTIVE_IND, 0},
- {ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0},
- {ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, 0},
- {ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, 0},
+ {ST_PLCI_ALLOCATED, ST_PLCI_ACTIVE, EV_PLCI_CONNECT_ACTIVE_IND, NULL},
+ {ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, NULL},
+ {ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, NULL},
+ {ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, NULL},
/* P-ACT */
- {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0},
- {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, 0},
- {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, 0},
- {ST_PLCI_ACTIVE, ST_PLCI_HELD, EV_PLCI_HOLD_IND, 0},
- {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTING, EV_PLCI_SUSPEND_IND, 0},
+ {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, NULL},
+ {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, NULL},
+ {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, NULL},
+ {ST_PLCI_ACTIVE, ST_PLCI_HELD, EV_PLCI_HOLD_IND, NULL},
+ {ST_PLCI_ACTIVE, ST_PLCI_DISCONNECTING, EV_PLCI_SUSPEND_IND, NULL},
/* P-2 */
- {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_CONNECT_REJECT, 0},
- {ST_PLCI_INCOMING, ST_PLCI_FACILITY_IND, EV_PLCI_FACILITY_IND_UP, 0},
- {ST_PLCI_INCOMING, ST_PLCI_ACCEPTING, EV_PLCI_CONNECT_RESP, 0},
- {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0},
- {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, 0},
- {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, 0},
- {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_CD_IND, 0},
+ {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_CONNECT_REJECT, NULL},
+ {ST_PLCI_INCOMING, ST_PLCI_FACILITY_IND, EV_PLCI_FACILITY_IND_UP, NULL},
+ {ST_PLCI_INCOMING, ST_PLCI_ACCEPTING, EV_PLCI_CONNECT_RESP, NULL},
+ {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, NULL},
+ {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, NULL},
+ {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, NULL},
+ {ST_PLCI_INCOMING, ST_PLCI_DISCONNECTING, EV_PLCI_CD_IND, NULL},
/* P-3 */
- {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTING, EV_PLCI_CONNECT_REJECT, 0},
- {ST_PLCI_FACILITY_IND, ST_PLCI_ACCEPTING, EV_PLCI_CONNECT_ACTIVE_IND, 0},
- {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0},
- {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, 0},
- {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, 0},
+ {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTING, EV_PLCI_CONNECT_REJECT, NULL},
+ {ST_PLCI_FACILITY_IND, ST_PLCI_ACCEPTING, EV_PLCI_CONNECT_ACTIVE_IND, NULL},
+ {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, NULL},
+ {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, NULL},
+ {ST_PLCI_FACILITY_IND, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, NULL},
/* P-4 */
- {ST_PLCI_ACCEPTING, ST_PLCI_ACTIVE, EV_PLCI_CONNECT_ACTIVE_IND, 0},
- {ST_PLCI_ACCEPTING, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0},
- {ST_PLCI_ACCEPTING, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, 0},
- {ST_PLCI_ACCEPTING, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, 0},
+ {ST_PLCI_ACCEPTING, ST_PLCI_ACTIVE, EV_PLCI_CONNECT_ACTIVE_IND, NULL},
+ {ST_PLCI_ACCEPTING, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, NULL},
+ {ST_PLCI_ACCEPTING, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, NULL},
+ {ST_PLCI_ACCEPTING, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, NULL},
/* P-5 */
- {ST_PLCI_DISCONNECTING, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, 0},
+ {ST_PLCI_DISCONNECTING, ST_PLCI_DISCONNECTED, EV_PLCI_DISCONNECT_IND, NULL},
/* P-6 */
{ST_PLCI_DISCONNECTED, ST_PLCI_NONE, EV_PLCI_DISCONNECT_RESP, p0},
/* P-0.Res */
{ST_PLCI_RESUMEING, ST_PLCI_NONE, EV_PLCI_RESUME_CONF_ERROR, p0},
- {ST_PLCI_RESUMEING, ST_PLCI_RESUME, EV_PLCI_RESUME_CONF_OK, 0},
+ {ST_PLCI_RESUMEING, ST_PLCI_RESUME, EV_PLCI_RESUME_CONF_OK, NULL},
/* P-RES */
- {ST_PLCI_RESUME, ST_PLCI_ACTIVE, EV_PLCI_RESUME_IND, 0},
+ {ST_PLCI_RESUME, ST_PLCI_ACTIVE, EV_PLCI_RESUME_IND, NULL},
/* P-HELD */
- {ST_PLCI_HELD, ST_PLCI_ACTIVE, EV_PLCI_RETRIEVE_IND, 0},
+ {ST_PLCI_HELD, ST_PLCI_ACTIVE, EV_PLCI_RETRIEVE_IND, NULL},
{},
};
global.ap.applid,
card->msgid++,
ncci->plcip->plci,
- 0, /* BChannelinformation */
- 0, /* Keypadfacility */
- 0, /* Useruserdata */ /* $$$$ */
- 0 /* Facilitydataarray */
+ NULL, /* BChannelinformation */
+ NULL, /* Keypadfacility */
+ NULL, /* Useruserdata */ /* $$$$ */
+ NULL /* Facilitydataarray */
);
send_message(card, &cmsg);
plci_change_state(card, ncci->plcip, EV_PLCI_DISCONNECT_REQ);
static struct nccistatechange nccitable[] =
{
/* N-0 */
- {ST_NCCI_NONE, ST_NCCI_OUTGOING, EV_NCCI_CONNECT_B3_REQ, 0},
- {ST_NCCI_NONE, ST_NCCI_INCOMING, EV_NCCI_CONNECT_B3_IND, 0},
+ {ST_NCCI_NONE, ST_NCCI_OUTGOING, EV_NCCI_CONNECT_B3_REQ, NULL},
+ {ST_NCCI_NONE, ST_NCCI_INCOMING, EV_NCCI_CONNECT_B3_IND, NULL},
/* N-0.1 */
- {ST_NCCI_OUTGOING, ST_NCCI_ALLOCATED, EV_NCCI_CONNECT_B3_CONF_OK, 0},
+ {ST_NCCI_OUTGOING, ST_NCCI_ALLOCATED, EV_NCCI_CONNECT_B3_CONF_OK, NULL},
{ST_NCCI_OUTGOING, ST_NCCI_NONE, EV_NCCI_CONNECT_B3_CONF_ERROR, n0},
/* N-1 */
- {ST_NCCI_INCOMING, ST_NCCI_DISCONNECTING, EV_NCCI_CONNECT_B3_REJECT, 0},
- {ST_NCCI_INCOMING, ST_NCCI_ALLOCATED, EV_NCCI_CONNECT_B3_RESP, 0},
- {ST_NCCI_INCOMING, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, 0},
- {ST_NCCI_INCOMING, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, 0},
+ {ST_NCCI_INCOMING, ST_NCCI_DISCONNECTING, EV_NCCI_CONNECT_B3_REJECT, NULL},
+ {ST_NCCI_INCOMING, ST_NCCI_ALLOCATED, EV_NCCI_CONNECT_B3_RESP, NULL},
+ {ST_NCCI_INCOMING, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, NULL},
+ {ST_NCCI_INCOMING, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, NULL},
/* N-2 */
- {ST_NCCI_ALLOCATED, ST_NCCI_ACTIVE, EV_NCCI_CONNECT_B3_ACTIVE_IND, 0},
- {ST_NCCI_ALLOCATED, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, 0},
- {ST_NCCI_ALLOCATED, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, 0},
+ {ST_NCCI_ALLOCATED, ST_NCCI_ACTIVE, EV_NCCI_CONNECT_B3_ACTIVE_IND, NULL},
+ {ST_NCCI_ALLOCATED, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, NULL},
+ {ST_NCCI_ALLOCATED, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, NULL},
/* N-ACT */
- {ST_NCCI_ACTIVE, ST_NCCI_ACTIVE, EV_NCCI_RESET_B3_IND, 0},
- {ST_NCCI_ACTIVE, ST_NCCI_RESETING, EV_NCCI_RESET_B3_REQ, 0},
- {ST_NCCI_ACTIVE, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, 0},
- {ST_NCCI_ACTIVE, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, 0},
+ {ST_NCCI_ACTIVE, ST_NCCI_ACTIVE, EV_NCCI_RESET_B3_IND, NULL},
+ {ST_NCCI_ACTIVE, ST_NCCI_RESETING, EV_NCCI_RESET_B3_REQ, NULL},
+ {ST_NCCI_ACTIVE, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, NULL},
+ {ST_NCCI_ACTIVE, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, NULL},
/* N-3 */
- {ST_NCCI_RESETING, ST_NCCI_ACTIVE, EV_NCCI_RESET_B3_IND, 0},
- {ST_NCCI_RESETING, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, 0},
- {ST_NCCI_RESETING, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, 0},
+ {ST_NCCI_RESETING, ST_NCCI_ACTIVE, EV_NCCI_RESET_B3_IND, NULL},
+ {ST_NCCI_RESETING, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, NULL},
+ {ST_NCCI_RESETING, ST_NCCI_DISCONNECTING, EV_NCCI_DISCONNECT_B3_REQ, NULL},
/* N-4 */
- {ST_NCCI_DISCONNECTING, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, 0},
- {ST_NCCI_DISCONNECTING, ST_NCCI_PREVIOUS, EV_NCCI_DISCONNECT_B3_CONF_ERROR,0},
+ {ST_NCCI_DISCONNECTING, ST_NCCI_DISCONNECTED, EV_NCCI_DISCONNECT_B3_IND, NULL},
+ {ST_NCCI_DISCONNECTING, ST_NCCI_PREVIOUS, EV_NCCI_DISCONNECT_B3_CONF_ERROR,NULL},
/* N-5 */
{ST_NCCI_DISCONNECTED, ST_NCCI_NONE, EV_NCCI_DISCONNECT_B3_RESP, n0},
{},
goto ignored;
case CAPI_MANUFACTURER_CONF: /* Controller */
if (cmsg->ManuID == 0x214D5641) {
- char *s = 0;
+ char *s = NULL;
switch (cmsg->Class) {
case 0: break;
case 1: s = "unknown class"; break;
global.ap.applid,
card->msgid++,
plcip->plci, /* adr */
- 0, /* BChannelinformation */
- 0, /* Keypadfacility */
- 0, /* Useruserdata */
- 0 /* Facilitydataarray */
+ NULL,/* BChannelinformation */
+ NULL,/* Keypadfacility */
+ NULL,/* Useruserdata */
+ NULL /* Facilitydataarray */
);
plcip->msgid = cmsg->Messagenumber;
send_message(card, cmsg);
global.ap.applid,
card->msgid++,
plcip->plci, /* adr */
- 0 /* NCPI */
+ NULL /* NCPI */
);
nccip->msgid = cmsg->Messagenumber;
send_message(card, cmsg);
card->msgid++,
nccip->ncci, /* adr */
0, /* Reject */
- 0 /* NCPI */
+ NULL /* NCPI */
);
send_message(card, cmsg);
ncci_change_state(card, nccip, EV_NCCI_CONNECT_B3_RESP);
card->msgid++,
cmsg->adr.adrNCCI,
2, /* Reject */
- 0 /* NCPI */
+ NULL /* NCPI */
);
send_message(card, cmsg);
break;
si2cip(bchan->si1, bchan->si2), /* cipvalue */
called, /* CalledPartyNumber */
calling, /* CallingPartyNumber */
- 0, /* CalledPartySubaddress */
- 0, /* CallingPartySubaddress */
+ NULL, /* CalledPartySubaddress */
+ NULL, /* CallingPartySubaddress */
b1prot(bchan->l2, bchan->l3), /* B1protocol */
b2prot(bchan->l2, bchan->l3), /* B2protocol */
b3prot(bchan->l2, bchan->l3), /* B3protocol */
b1config(bchan->l2, bchan->l3), /* B1configuration */
- 0, /* B2configuration */
- 0, /* B3configuration */
- 0, /* BC */
- 0, /* LLC */
- 0, /* HLC */
+ NULL, /* B2configuration */
+ NULL, /* B3configuration */
+ NULL, /* BC */
+ NULL, /* LLC */
+ NULL, /* HLC */
/* BChannelinformation */
isleasedline ? AdditionalInfo : 0,
- 0, /* Keypadfacility */
- 0, /* Useruserdata */
- 0 /* Facilitydataarray */
+ NULL, /* Keypadfacility */
+ NULL, /* Useruserdata */
+ NULL /* Facilitydataarray */
);
if ((plcip = new_plci(card, (c->arg % card->nbchan))) == 0) {
cmd.command = ISDN_STAT_DHUP;
b2prot(bchan->l2, bchan->l3), /* B2protocol */
b3prot(bchan->l2, bchan->l3), /* B3protocol */
b1config(bchan->l2, bchan->l3), /* B1configuration */
- 0, /* B2configuration */
- 0, /* B3configuration */
- 0, /* ConnectedNumber */
- 0, /* ConnectedSubaddress */
- 0, /* LLC */
- 0, /* BChannelinformation */
- 0, /* Keypadfacility */
- 0, /* Useruserdata */
- 0 /* Facilitydataarray */
+ NULL, /* B2configuration */
+ NULL, /* B3configuration */
+ NULL, /* ConnectedNumber */
+ NULL, /* ConnectedSubaddress */
+ NULL, /* LLC */
+ NULL, /* BChannelinformation */
+ NULL, /* Keypadfacility */
+ NULL, /* Useruserdata */
+ NULL /* Facilitydataarray */
);
capi_cmsg2message(&cmdcmsg, cmdcmsg.buf);
plci_change_state(card, bchan->plcip, EV_PLCI_CONNECT_RESP);
global.ap.applid,
card->msgid++,
bchan->nccip->ncci,
- 0 /* NCPI */
+ NULL /* NCPI */
);
ncci_change_state(card, bchan->nccip, EV_NCCI_DISCONNECT_B3_REQ);
send_message(card, &cmdcmsg);
global.ap.applid,
card->msgid++,
bchan->plcip->plci,
- 0, /* BChannelinformation */
- 0, /* Keypadfacility */
- 0, /* Useruserdata */
- 0 /* Facilitydataarray */
+ NULL, /* BChannelinformation */
+ NULL, /* Keypadfacility */
+ NULL, /* Useruserdata */
+ NULL /* Facilitydataarray */
);
plci_change_state(card, bchan->plcip, EV_PLCI_DISCONNECT_REQ);
send_message(card, &cmdcmsg);
1 << 6, /* Infomask */
card->cipmask,
card->cipmask2,
- 0, 0);
+ NULL, NULL);
send_message(card, &cmdcmsg);
listen_change_state(card, EV_LISTEN_REQ);
}
card->interface.maxbufsize = 2048;
card->interface.command = if_command;
card->interface.writebuf_skb = if_sendbuf;
- card->interface.writecmd = 0;
+ card->interface.writecmd = NULL;
card->interface.readstat = if_readstat;
card->interface.features = ISDN_FEATURE_L2_HDLC |
ISDN_FEATURE_L2_TRANS |
card->nbchan--;
}
kfree(card->bchans);
- card->bchans = 0;
+ card->bchans = NULL;
if (debugmode)
printk(KERN_DEBUG "capidrv-%d: id=%d isdn unload\n",
for (pp = &global.contr_list; *pp; pp = &(*pp)->next) {
if (*pp == card) {
*pp = (*pp)->next;
- card->next = 0;
+ card->next = NULL;
global.ncontr--;
break;
}
for (i=0; i < nelem; i++) {
struct procfsentries *p = procfsentries + i;
- p->procent = create_proc_entry(p->name, p->mode, 0);
+ p->procent = create_proc_entry(p->name, p->mode, NULL);
if (p->procent) p->procent->read_proc = p->read_proc;
}
}
for (i=nelem-1; i >= 0; i--) {
struct procfsentries *p = procfsentries + i;
if (p->procent) {
- remove_proc_entry(p->name, 0);
- p->procent = 0;
+ remove_proc_entry(p->name, NULL);
+ p->procent = NULL;
}
}
}
static inline void mq_init(struct capilib_ncci * np)
{
u_int i;
- np->msgidqueue = 0;
- np->msgidlast = 0;
+ np->msgidqueue = NULL;
+ np->msgidlast = NULL;
np->nmsg = 0;
memset(np->msgidpool, 0, sizeof(np->msgidpool));
np->msgidfree = &np->msgidpool[0];
return 0;
np->msgidfree = mq->next;
mq->msgid = msgid;
- mq->next = 0;
+ mq->next = NULL;
if (np->msgidlast)
np->msgidlast->next = mq;
np->msgidlast = mq;
struct capilib_msgidqueue *mq = *pp;
*pp = mq->next;
if (mq == np->msgidlast)
- np->msgidlast = 0;
+ np->msgidlast = NULL;
mq->next = np->msgidfree;
np->msgidfree = mq;
np->nmsg--;
static unsigned char *cpars[] =
{
- /*00 */ 0,
- /*01 ALERT_REQ */ (unsigned char *) "\x03\x04\x0c\x27\x2f\x1c\x01\x01",
- /*02 CONNECT_REQ */ (unsigned char *) "\x03\x14\x0e\x10\x0f\x11\x0d\x06\x08\x0a\x05\x07\x09\x01\x0b\x28\x22\x04\x0c\x27\x2f\x1c\x01\x01",
- /*03 */ 0,
- /*04 DISCONNECT_REQ */ (unsigned char *) "\x03\x04\x0c\x27\x2f\x1c\x01\x01",
- /*05 LISTEN_REQ */ (unsigned char *) "\x03\x25\x12\x13\x10\x11\x01",
- /*06 */ 0,
- /*07 */ 0,
- /*08 INFO_REQ */ (unsigned char *) "\x03\x0e\x04\x0c\x27\x2f\x1c\x01\x01",
- /*09 FACILITY_REQ */ (unsigned char *) "\x03\x1f\x1e\x01",
- /*0a SELECT_B_PROTOCOL_REQ */ (unsigned char *) "\x03\x0d\x06\x08\x0a\x05\x07\x09\x01\x01",
- /*0b CONNECT_B3_REQ */ (unsigned char *) "\x03\x2b\x01",
- /*0c */ 0,
- /*0d DISCONNECT_B3_REQ */ (unsigned char *) "\x03\x2b\x01",
- /*0e */ 0,
- /*0f DATA_B3_REQ */ (unsigned char *) "\x03\x18\x1a\x19\x20\x01",
- /*10 RESET_B3_REQ */ (unsigned char *) "\x03\x2b\x01",
- /*11 */ 0,
- /*12 */ 0,
- /*13 ALERT_CONF */ (unsigned char *) "\x03\x23\x01",
- /*14 CONNECT_CONF */ (unsigned char *) "\x03\x23\x01",
- /*15 */ 0,
- /*16 DISCONNECT_CONF */ (unsigned char *) "\x03\x23\x01",
- /*17 LISTEN_CONF */ (unsigned char *) "\x03\x23\x01",
- /*18 MANUFACTURER_REQ */ (unsigned char *) "\x03\x2a\x15\x21\x29\x01",
- /*19 */ 0,
- /*1a INFO_CONF */ (unsigned char *) "\x03\x23\x01",
- /*1b FACILITY_CONF */ (unsigned char *) "\x03\x23\x1f\x1b\x01",
- /*1c SELECT_B_PROTOCOL_CONF */ (unsigned char *) "\x03\x23\x01",
- /*1d CONNECT_B3_CONF */ (unsigned char *) "\x03\x23\x01",
- /*1e */ 0,
- /*1f DISCONNECT_B3_CONF */ (unsigned char *) "\x03\x23\x01",
- /*20 */ 0,
- /*21 DATA_B3_CONF */ (unsigned char *) "\x03\x19\x23\x01",
- /*22 RESET_B3_CONF */ (unsigned char *) "\x03\x23\x01",
- /*23 */ 0,
- /*24 */ 0,
- /*25 */ 0,
- /*26 CONNECT_IND */ (unsigned char *) "\x03\x14\x0e\x10\x0f\x11\x0b\x28\x22\x04\x0c\x27\x2f\x1c\x01\x01",
- /*27 CONNECT_ACTIVE_IND */ (unsigned char *) "\x03\x16\x17\x28\x01",
- /*28 DISCONNECT_IND */ (unsigned char *) "\x03\x2c\x01",
- /*29 */ 0,
- /*2a MANUFACTURER_CONF */ (unsigned char *) "\x03\x2a\x15\x21\x29\x01",
- /*2b */ 0,
- /*2c INFO_IND */ (unsigned char *) "\x03\x26\x24\x01",
- /*2d FACILITY_IND */ (unsigned char *) "\x03\x1f\x1d\x01",
- /*2e */ 0,
- /*2f CONNECT_B3_IND */ (unsigned char *) "\x03\x2b\x01",
- /*30 CONNECT_B3_ACTIVE_IND */ (unsigned char *) "\x03\x2b\x01",
- /*31 DISCONNECT_B3_IND */ (unsigned char *) "\x03\x2d\x2b\x01",
- /*32 */ 0,
- /*33 DATA_B3_IND */ (unsigned char *) "\x03\x18\x1a\x19\x20\x01",
- /*34 RESET_B3_IND */ (unsigned char *) "\x03\x2b\x01",
- /*35 CONNECT_B3_T90_ACTIVE_IND */ (unsigned char *) "\x03\x2b\x01",
- /*36 */ 0,
- /*37 */ 0,
- /*38 CONNECT_RESP */ (unsigned char *) "\x03\x2e\x0d\x06\x08\x0a\x05\x07\x09\x01\x16\x17\x28\x04\x0c\x27\x2f\x1c\x01\x01",
- /*39 CONNECT_ACTIVE_RESP */ (unsigned char *) "\x03\x01",
- /*3a DISCONNECT_RESP */ (unsigned char *) "\x03\x01",
- /*3b */ 0,
- /*3c MANUFACTURER_IND */ (unsigned char *) "\x03\x2a\x15\x21\x29\x01",
- /*3d */ 0,
- /*3e INFO_RESP */ (unsigned char *) "\x03\x01",
- /*3f FACILITY_RESP */ (unsigned char *) "\x03\x1f\x01",
- /*40 */ 0,
- /*41 CONNECT_B3_RESP */ (unsigned char *) "\x03\x2e\x2b\x01",
- /*42 CONNECT_B3_ACTIVE_RESP */ (unsigned char *) "\x03\x01",
- /*43 DISCONNECT_B3_RESP */ (unsigned char *) "\x03\x01",
- /*44 */ 0,
- /*45 DATA_B3_RESP */ (unsigned char *) "\x03\x19\x01",
- /*46 RESET_B3_RESP */ (unsigned char *) "\x03\x01",
- /*47 CONNECT_B3_T90_ACTIVE_RESP */ (unsigned char *) "\x03\x01",
- /*48 */ 0,
- /*49 */ 0,
- /*4a */ 0,
- /*4b */ 0,
- /*4c */ 0,
- /*4d */ 0,
- /*4e MANUFACTURER_RESP */ (unsigned char *) "\x03\x2a\x15\x21\x29\x01",
+ /* ALERT_REQ */ [0x01] = "\x03\x04\x0c\x27\x2f\x1c\x01\x01",
+ /* CONNECT_REQ */ [0x02] = "\x03\x14\x0e\x10\x0f\x11\x0d\x06\x08\x0a\x05\x07\x09\x01\x0b\x28\x22\x04\x0c\x27\x2f\x1c\x01\x01",
+ /* DISCONNECT_REQ */ [0x04] = "\x03\x04\x0c\x27\x2f\x1c\x01\x01",
+ /* LISTEN_REQ */ [0x05] = "\x03\x25\x12\x13\x10\x11\x01",
+ /* INFO_REQ */ [0x08] = "\x03\x0e\x04\x0c\x27\x2f\x1c\x01\x01",
+ /* FACILITY_REQ */ [0x09] = "\x03\x1f\x1e\x01",
+ /* SELECT_B_PROTOCOL_REQ */ [0x0a] = "\x03\x0d\x06\x08\x0a\x05\x07\x09\x01\x01",
+ /* CONNECT_B3_REQ */ [0x0b] = "\x03\x2b\x01",
+ /* DISCONNECT_B3_REQ */ [0x0d] = "\x03\x2b\x01",
+ /* DATA_B3_REQ */ [0x0f] = "\x03\x18\x1a\x19\x20\x01",
+ /* RESET_B3_REQ */ [0x10] = "\x03\x2b\x01",
+ /* ALERT_CONF */ [0x13] = "\x03\x23\x01",
+ /* CONNECT_CONF */ [0x14] = "\x03\x23\x01",
+ /* DISCONNECT_CONF */ [0x16] = "\x03\x23\x01",
+ /* LISTEN_CONF */ [0x17] = "\x03\x23\x01",
+ /* MANUFACTURER_REQ */ [0x18] = "\x03\x2a\x15\x21\x29\x01",
+ /* INFO_CONF */ [0x1a] = "\x03\x23\x01",
+ /* FACILITY_CONF */ [0x1b] = "\x03\x23\x1f\x1b\x01",
+ /* SELECT_B_PROTOCOL_CONF */ [0x1c] = "\x03\x23\x01",
+ /* CONNECT_B3_CONF */ [0x1d] = "\x03\x23\x01",
+ /* DISCONNECT_B3_CONF */ [0x1f] = "\x03\x23\x01",
+ /* DATA_B3_CONF */ [0x21] = "\x03\x19\x23\x01",
+ /* RESET_B3_CONF */ [0x22] = "\x03\x23\x01",
+ /* CONNECT_IND */ [0x26] = "\x03\x14\x0e\x10\x0f\x11\x0b\x28\x22\x04\x0c\x27\x2f\x1c\x01\x01",
+ /* CONNECT_ACTIVE_IND */ [0x27] = "\x03\x16\x17\x28\x01",
+ /* DISCONNECT_IND */ [0x28] = "\x03\x2c\x01",
+ /* MANUFACTURER_CONF */ [0x2a] = "\x03\x2a\x15\x21\x29\x01",
+ /* INFO_IND */ [0x2c] = "\x03\x26\x24\x01",
+ /* FACILITY_IND */ [0x2d] = "\x03\x1f\x1d\x01",
+ /* CONNECT_B3_IND */ [0x2f] = "\x03\x2b\x01",
+ /* CONNECT_B3_ACTIVE_IND */ [0x30] = "\x03\x2b\x01",
+ /* DISCONNECT_B3_IND */ [0x31] = "\x03\x2d\x2b\x01",
+ /* DATA_B3_IND */ [0x33] = "\x03\x18\x1a\x19\x20\x01",
+ /* RESET_B3_IND */ [0x34] = "\x03\x2b\x01",
+ /* CONNECT_B3_T90_ACTIVE_IND */ [0x35] = "\x03\x2b\x01",
+ /* CONNECT_RESP */ [0x38] = "\x03\x2e\x0d\x06\x08\x0a\x05\x07\x09\x01\x16\x17\x28\x04\x0c\x27\x2f\x1c\x01\x01",
+ /* CONNECT_ACTIVE_RESP */ [0x39] = "\x03\x01",
+ /* DISCONNECT_RESP */ [0x3a] = "\x03\x01",
+ /* MANUFACTURER_IND */ [0x3c] = "\x03\x2a\x15\x21\x29\x01",
+ /* INFO_RESP */ [0x3e] = "\x03\x01",
+ /* FACILITY_RESP */ [0x3f] = "\x03\x1f\x01",
+ /* CONNECT_B3_RESP */ [0x41] = "\x03\x2e\x2b\x01",
+ /* CONNECT_B3_ACTIVE_RESP */ [0x42] = "\x03\x01",
+ /* DISCONNECT_B3_RESP */ [0x43] = "\x03\x01",
+ /* DATA_B3_RESP */ [0x45] = "\x03\x19\x01",
+ /* RESET_B3_RESP */ [0x46] = "\x03\x01",
+ /* CONNECT_B3_T90_ACTIVE_RESP */ [0x47] = "\x03\x01",
+ /* MANUFACTURER_RESP */ [0x4e] = "\x03\x2a\x15\x21\x29\x01",
};
/*-------------------------------------------------------*/
static char *mnames[] =
{
- 0,
- "ALERT_REQ",
- "CONNECT_REQ",
- 0,
- "DISCONNECT_REQ",
- "LISTEN_REQ",
- 0,
- 0,
- "INFO_REQ",
- "FACILITY_REQ",
- "SELECT_B_PROTOCOL_REQ",
- "CONNECT_B3_REQ",
- 0,
- "DISCONNECT_B3_REQ",
- 0,
- "DATA_B3_REQ",
- "RESET_B3_REQ",
- 0,
- 0,
- "ALERT_CONF",
- "CONNECT_CONF",
- 0,
- "DISCONNECT_CONF",
- "LISTEN_CONF",
- "MANUFACTURER_REQ",
- 0,
- "INFO_CONF",
- "FACILITY_CONF",
- "SELECT_B_PROTOCOL_CONF",
- "CONNECT_B3_CONF",
- 0,
- "DISCONNECT_B3_CONF",
- 0,
- "DATA_B3_CONF",
- "RESET_B3_CONF",
- 0,
- 0,
- 0,
- "CONNECT_IND",
- "CONNECT_ACTIVE_IND",
- "DISCONNECT_IND",
- 0,
- "MANUFACTURER_CONF",
- 0,
- "INFO_IND",
- "FACILITY_IND",
- 0,
- "CONNECT_B3_IND",
- "CONNECT_B3_ACTIVE_IND",
- "DISCONNECT_B3_IND",
- 0,
- "DATA_B3_IND",
- "RESET_B3_IND",
- "CONNECT_B3_T90_ACTIVE_IND",
- 0,
- 0,
- "CONNECT_RESP",
- "CONNECT_ACTIVE_RESP",
- "DISCONNECT_RESP",
- 0,
- "MANUFACTURER_IND",
- 0,
- "INFO_RESP",
- "FACILITY_RESP",
- 0,
- "CONNECT_B3_RESP",
- "CONNECT_B3_ACTIVE_RESP",
- "DISCONNECT_B3_RESP",
- 0,
- "DATA_B3_RESP",
- "RESET_B3_RESP",
- "CONNECT_B3_T90_ACTIVE_RESP",
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- "MANUFACTURER_RESP"
+ [0x01] = "ALERT_REQ",
+ [0x02] = "CONNECT_REQ",
+ [0x04] = "DISCONNECT_REQ",
+ [0x05] = "LISTEN_REQ",
+ [0x08] = "INFO_REQ",
+ [0x09] = "FACILITY_REQ",
+ [0x0a] = "SELECT_B_PROTOCOL_REQ",
+ [0x0b] = "CONNECT_B3_REQ",
+ [0x0d] = "DISCONNECT_B3_REQ",
+ [0x0f] = "DATA_B3_REQ",
+ [0x10] = "RESET_B3_REQ",
+ [0x13] = "ALERT_CONF",
+ [0x14] = "CONNECT_CONF",
+ [0x16] = "DISCONNECT_CONF",
+ [0x17] = "LISTEN_CONF",
+ [0x18] = "MANUFACTURER_REQ",
+ [0x1a] = "INFO_CONF",
+ [0x1b] = "FACILITY_CONF",
+ [0x1c] = "SELECT_B_PROTOCOL_CONF",
+ [0x1d] = "CONNECT_B3_CONF",
+ [0x1f] = "DISCONNECT_B3_CONF",
+ [0x21] = "DATA_B3_CONF",
+ [0x22] = "RESET_B3_CONF",
+ [0x26] = "CONNECT_IND",
+ [0x27] = "CONNECT_ACTIVE_IND",
+ [0x28] = "DISCONNECT_IND",
+ [0x2a] = "MANUFACTURER_CONF",
+ [0x2c] = "INFO_IND",
+ [0x2d] = "FACILITY_IND",
+ [0x2f] = "CONNECT_B3_IND",
+ [0x30] = "CONNECT_B3_ACTIVE_IND",
+ [0x31] = "DISCONNECT_B3_IND",
+ [0x33] = "DATA_B3_IND",
+ [0x34] = "RESET_B3_IND",
+ [0x35] = "CONNECT_B3_T90_ACTIVE_IND",
+ [0x38] = "CONNECT_RESP",
+ [0x39] = "CONNECT_ACTIVE_RESP",
+ [0x3a] = "DISCONNECT_RESP",
+ [0x3c] = "MANUFACTURER_IND",
+ [0x3e] = "INFO_RESP",
+ [0x3f] = "FACILITY_RESP",
+ [0x41] = "CONNECT_B3_RESP",
+ [0x42] = "CONNECT_B3_ACTIVE_RESP",
+ [0x43] = "DISCONNECT_B3_RESP",
+ [0x45] = "DATA_B3_RESP",
+ [0x46] = "RESET_B3_RESP",
+ [0x47] = "CONNECT_B3_T90_ACTIVE_RESP",
+ [0x4e] = "MANUFACTURER_RESP"
};
char *capi_cmd2str(u8 cmd, u8 subcmd)
static char *pnames[] =
{
- /*00 */ 0,
- /*01 */ 0,
- /*02 */ 0,
+ /*00 */ NULL,
+ /*01 */ NULL,
+ /*02 */ NULL,
/*03 */ "Controller/PLCI/NCCI",
/*04 */ "AdditionalInfo",
/*05 */ "B1configuration",
static char buf[8192];
-static char *p = 0;
+static char *p = NULL;
#include <stdarg.h>
for (applid = 1; applid <= CAPI_MAXAPPL; applid++) {
ap = get_capi_appl_by_nr(applid);
if (ap && ap->callback && !ap->release_in_progress)
- ap->callback(KCI_CONTRDOWN, contr, 0);
+ ap->callback(KCI_CONTRDOWN, contr, NULL);
}
}
card->traceflag = showcapimsgs;
sprintf(card->procfn, "capi/controllers/%d", card->cnr);
- card->procent = create_proc_entry(card->procfn, 0, 0);
+ card->procent = create_proc_entry(card->procfn, 0, NULL);
if (card->procent) {
card->procent->read_proc =
(int (*)(char *,char **,off_t,int,int *,void *))
ncards--;
if (card->procent) {
- remove_proc_entry(card->procfn, 0);
- card->procent = 0;
+ remove_proc_entry(card->procfn, NULL);
+ card->procent = NULL;
}
capi_cards[card->cnr - 1] = NULL;
printk(KERN_NOTICE "kcapi: Controller %d: %s unregistered\n",
ap->nrecvdatapkt = 0;
ap->nsentctlpkt = 0;
ap->nsentdatapkt = 0;
- ap->callback = 0;
+ ap->callback = NULL;
init_MUTEX(&ap->recv_sem);
skb_queue_head_init(&ap->recv_queue);
INIT_WORK(&ap->recv_work, recv_handler, (void *)ap);
avmb1_resetdef rdef;
capicardparams cparams;
struct capi_ctr *card;
- struct capi_driver *driver = 0;
+ struct capi_driver *driver = NULL;
capiloaddata ldata;
struct list_head *l;
unsigned long flags;
}
break;
default:
- driver = 0;
+ driver = NULL;
break;
}
if (!driver) {
sizeof(avmb1_loaddef)))
return -EFAULT;
ldef.t4config.len = 0;
- ldef.t4config.data = 0;
+ ldef.t4config.data = NULL;
} else {
if (copy_from_user((void *)&ldef, data,
sizeof(avmb1_loadandconfigdef)))
case KCAPI_CMD_ADDCARD:
{
struct list_head *l;
- struct capi_driver *driver = 0;
+ struct capi_driver *driver = NULL;
capicardparams cparams;
kcapi_carddef cdef;
int retval;
static __inline__ struct capi_driver *capi_driver_get_idx(loff_t pos)
{
- struct capi_driver *drv = 0;
+ struct capi_driver *drv = NULL;
struct list_head *l;
loff_t i;
if (i++ == pos)
return drv;
}
- return 0;
+ return NULL;
}
static void *capi_driver_start(struct seq_file *seq, loff_t *pos)
{
struct capi_driver *drv = (struct capi_driver *)v;
++*pos;
- if (drv->list.next == &capi_drivers) return 0;
+ if (drv->list.next == &capi_drivers) return NULL;
return list_entry(drv->list.next, struct capi_driver, list);
}
word length = 12, dlength = 0;
byte *write;
CAPI_MSG msg;
- byte *string = 0;
+ byte *string = NULL;
va_list ap;
diva_os_message_buffer_s *dmb;
diva_card *card = NULL;
req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback;
- req.didd_notify.info.context = 0;
+ req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) {
stop_dbg();
void diva_os_set_controller_struct(struct capi_ctr *ctrl)
{
ctrl->driver_name = DRIVERLNAME;
- ctrl->load_firmware = 0;
- ctrl->reset_ctr = 0;
+ ctrl->load_firmware = NULL;
+ ctrl->reset_ctr = NULL;
ctrl->ctr_read_proc = diva_ctl_read_proc;
ctrl->owner = THIS_MODULE;
}
diva_os_spin_lock_magic_t irql;
if (handle && ((--handle) < DIVA_DIDD_MAX_NOTIFICATIONS)) {
diva_os_enter_spin_lock (&didd_spin, &irql, "didd_nfy_rm");
- NotificationTable[handle].callback = 0;
- NotificationTable[handle].context = 0;
+ NotificationTable[handle].callback = NULL;
+ NotificationTable[handle].context = NULL;
diva_os_leave_spin_lock (&didd_spin, &irql, "didd_nfy_rm");
DBG_TRC(("Remove adapter notification[%d]", (int)(handle+1)))
return;
Q->Size = sizeBuffer;
Q->Base = Q->Head = Q->Tail = Buffer;
Q->High = Buffer + sizeBuffer;
- Q->Wrap = 0;
+ Q->Wrap = NULL;
Q->Count= 0;
}
if (Q->Tail == Q->Head) {
if (Q->Wrap || need > Q->Size) {
- return(0); /* full */
+ return NULL; /* full */
}
goto alloc; /* empty */
}
if (Q->Tail > Q->Head) {
if (Q->Tail + need <= Q->High) goto alloc; /* append */
if (Q->Base + need > Q->Head) {
- return (0); /* too much */
+ return NULL; /* too much */
}
/* wraparound the queue (but not the message) */
Q->Wrap = Q->Tail;
}
if (Q->Tail + need > Q->Head) {
- return (0); /* too much */
+ return NULL; /* too much */
}
alloc:
if (Q->Wrap) {
if (Q->Head >= Q->Wrap) {
Q->Head = Q->Base;
- Q->Wrap = 0;
+ Q->Wrap = NULL;
}
} else if (Q->Head >= Q->Tail) {
Q->Head = Q->Tail = Q->Base;
if (((byte *)Msg == Q->Tail && !Q->Wrap) ||
(Msg->Size & MSG_INCOMPLETE)) {
- return (0);
+ return NULL;
} else {
*size = Msg->Size;
return ((byte *)(Msg + 1));
/*
Message queue header
*/
-static MSG_QUEUE* dbg_queue = 0;
-static byte* dbg_base = 0;
-static int external_dbg_queue = 0;
+static MSG_QUEUE* dbg_queue;
+static byte* dbg_base;
+static int external_dbg_queue;
static diva_os_spin_lock_t dbg_q_lock;
static diva_os_spin_lock_t dbg_adapter_lock;
-static int dbg_q_busy = 0;
-static volatile dword dbg_sequence = 0;
+static int dbg_q_busy;
+static volatile dword dbg_sequence;
static dword start_sec;
static dword start_usec;
if (diva_os_initialize_spin_lock (&dbg_q_lock, "dbg_init")) {
- dbg_queue = 0;
- dbg_base = 0;
+ dbg_queue = NULL;
+ dbg_base = NULL;
external_dbg_queue = 0;
return (-1);
}
if (diva_os_initialize_spin_lock (&dbg_adapter_lock, "dbg_init")) {
diva_os_destroy_spin_lock(&dbg_q_lock, "dbg_init");
- dbg_queue = 0;
- dbg_base = 0;
+ dbg_queue = NULL;
+ dbg_base = NULL;
external_dbg_queue = 0;
return (-1);
}
void* ret = (void*)dbg_base;
int i;
- dbg_queue = 0;
- dbg_base = 0;
+ dbg_queue = NULL;
+ dbg_base = NULL;
if (ret) {
diva_os_destroy_spin_lock(&dbg_q_lock, "dbg_finit");
}
if (external_dbg_queue) {
- ret = 0;
+ ret = NULL;
}
external_dbg_queue = 0;
*/
diva_dbg_entry_head_t* diva_maint_get_message (word* size,
diva_os_spin_lock_magic_t* old_irql) {
- diva_dbg_entry_head_t* pmsg = 0;
+ diva_dbg_entry_head_t* pmsg = NULL;
diva_os_enter_spin_lock_hard (&dbg_q_lock, old_irql, "read");
if (dbg_q_busy) {
diva_os_leave_spin_lock_hard (&dbg_q_lock, old_irql, "read_busy");
- return (0);
+ return NULL;
}
dbg_q_busy = 1;
}
if (free_id != -1) {
- diva_dbg_entry_head_t* pmsg = 0;
+ diva_dbg_entry_head_t* pmsg = NULL;
int len;
char tmp[256];
word size;
dword sec, usec;
int i;
word size;
- byte* pmem = 0;
+ byte* pmem = NULL;
diva_os_get_time (&sec, &usec);
char tmp[256];
int len;
- clients[i].hDbg = 0;
+ clients[i].hDbg = NULL;
hDbg->id = -1;
hDbg->dbgMask = 0;
- hDbg->dbg_end = 0;
- hDbg->dbg_prt = 0;
- hDbg->dbg_irq = 0;
+ hDbg->dbg_end = NULL;
+ hDbg->dbg_prt = NULL;
+ hDbg->dbg_irq = NULL;
if (hDbg->Version > 0)
- hDbg->dbg_old = 0;
+ hDbg->dbg_old = NULL;
hDbg->Registered = 0;
- hDbg->next = 0;
+ hDbg->next = NULL;
if (clients[i].pIdiLib) {
(*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib);
- clients[i].pIdiLib = 0;
+ clients[i].pIdiLib = NULL;
pmem = clients[i].pmem;
- clients[i].pmem = 0;
+ clients[i].pmem = NULL;
}
/*
va_list ap) {
diva_os_spin_lock_magic_t old_irql;
dword sec, usec;
- diva_dbg_entry_head_t* pmsg = 0;
+ diva_dbg_entry_head_t* pmsg = NULL;
dword length;
word size;
static char fmtBuf[MSG_FRAME_MAX_SIZE+sizeof(*pmsg)+1];
dword sec, usec, logical, serial, org_mask;
int id, best_id = 0, free_id = -1;
char tmp[256];
- diva_dbg_entry_head_t* pmsg = 0;
+ diva_dbg_entry_head_t* pmsg = NULL;
int len;
word size;
byte* pmem;
if (((*(clients[id].pIdiLib->DivaSTraceLibraryStart))(clients[id].pIdiLib->hLib))) {
diva_mnt_internal_dprintf (0, DLI_ERR, "Adapter(%d) Start failed", (int)logical);
(*(clients[id].pIdiLib->DivaSTraceLibraryFinit))(clients[id].pIdiLib->hLib);
- clients[id].pIdiLib = 0;
+ clients[id].pIdiLib = NULL;
}
} else {
diva_mnt_internal_dprintf (0, DLI_ERR, "A(%d) management init failed", (int)logical);
}
if (!clients[id].pIdiLib) {
- clients[id].request = 0;
+ clients[id].request = NULL;
clients[id].request_pending = 0;
- clients[id].hDbg = 0;
+ clients[id].hDbg = NULL;
diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "register");
diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register");
diva_os_free (0, pmem);
dword sec, usec;
int i;
word size;
- byte* pmem = 0;
+ byte* pmem = NULL;
diva_os_get_time (&sec, &usec);
if (clients[i].pIdiLib) {
(*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib);
- clients[i].pIdiLib = 0;
+ clients[i].pIdiLib = NULL;
pmem = clients[i].pmem;
- clients[i].pmem = 0;
+ clients[i].pmem = NULL;
}
- clients[i].hDbg = 0;
- clients[i].request = 0;
+ clients[i].hDbg = NULL;
+ clients[i].request = NULL;
clients[i].request_pending = 0;
/*
}
}
- return (0);
+ return NULL;
}
int SuperTraceCloseAdapter (void* AdapterHandle) {
for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) {
- pmem = 0;
+ pmem = NULL;
diva_os_enter_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "unload");
diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "unload");
*/
if (clients[i].pIdiLib) {
(*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib);
- clients[i].pIdiLib = 0;
+ clients[i].pIdiLib = NULL;
pmem = clients[i].pmem;
- clients[i].pmem = 0;
+ clients[i].pmem = NULL;
}
- clients[i].hDbg = 0;
- clients[i].request = 0;
+ clients[i].hDbg = NULL;
+ clients[i].request = NULL;
clients[i].request_pending = 0;
} else {
fret = -1;
void pr_out(ADAPTER * a)
{
byte e_no;
- ENTITY * this = 0;
+ ENTITY * this = NULL;
BUFFERS *X;
word length;
word i;
word clength;
word offset;
BUFFERS *R;
- byte* cma = 0;
+ byte* cma = NULL;
#ifdef USE_EXTENDED_DEBUGS
{
DBG_TRC(("<A%d Id=0x%x Ind=0x%x", ((ISDN_ADAPTER *)a->io)->ANum, Id, Ind))
Id,
cma,
sizeof(a->stream_buffer),
- &final, 0, 0);
+ &final, NULL, NULL);
}
IoAdapter->RBuffer.length = MIN(MLength, 270);
if (IoAdapter->RBuffer.length != MLength) {
req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback;
- req.didd_notify.info.context = 0;
+ req.didd_notify.info.context = NULL;
_DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff)
return (0);
/*
EOL
*/
- {-1, 0}
+ {-1}
};
static void diva_init_request_array(void);
for (i = 0; divas_supported_cards[i].CardOrdinal != -1; i++) {
if (divas_supported_cards[i].CardOrdinal == CardOrdinal) {
if (!(pdiva = divas_create_pci_card(i, pdev))) {
- return (0);
+ return NULL;
}
switch (CardOrdinal) {
case CARDTYPE_DIVASRV_Q_8M_PCI:
DBG_ERR(("can not alloc request array"))
diva_driver_remove_card(pdiva);
- return (0);
+ return NULL;
}
}
- return (0);
+ return NULL;
}
/* --------------------------------------------------------------------------
int i;
pa = a[0] = (diva_os_xdi_adapter_t *) pdiva;
- a[1] = a[2] = a[3] = 0;
+ a[1] = a[2] = a[3] = NULL;
diva_os_enter_spin_lock(&adapter_lock, &old_irql, "remode adapter");
if (a[i]) {
if (a[i]->controller) {
DBG_LOG(("remove adapter (%d)",
- a[i]->controller)) IoAdapters[a[i]->controller - 1] = 0;
+ a[i]->controller)) IoAdapters[a[i]->controller - 1] = NULL;
remove_adapter_proc(a[i]);
}
diva_os_free(0, a[i]);
if (!(a = (diva_os_xdi_adapter_t *) diva_os_malloc(0, sizeof(*a)))) {
DBG_ERR(("A: can't alloc adapter"));
- return (0);
+ return NULL;
}
memset(a, 0x00, sizeof(*a));
diva_os_leave_spin_lock(&adapter_lock, &old_irql, "found_pci_card");
diva_os_free(0, a);
DBG_ERR(("A: can't get adapter resources"));
- return (0);
+ return NULL;
}
return (a);
(*(a->interface.cleanup_adapter_proc)) (a);
}
if (a->controller) {
- IoAdapters[a->controller - 1] = 0;
+ IoAdapters[a->controller - 1] = NULL;
remove_adapter_proc(a);
}
diva_os_free(0, a);
if (length < sizeof(diva_xdi_um_cfg_cmd_t)) {
DBG_ERR(("A: A(?) open, msg too small (%d < %d)",
length, sizeof(diva_xdi_um_cfg_cmd_t)))
- return (0);
+ return NULL;
}
if ((*cp_fn) (os_handle, &msg, src, sizeof(msg)) <= 0) {
DBG_ERR(("A: A(?) open, write error"))
- return (0);
+ return NULL;
}
diva_os_enter_spin_lock(&adapter_lock, &old_irql, "open_adapter");
list_for_each(tmp, &adapter_queue) {
a->xdi_mbox.status &= ~DIVA_XDI_MBOX_BUSY;
if (a->xdi_mbox.data) {
diva_os_free(0, a->xdi_mbox.data);
- a->xdi_mbox.data = 0;
+ a->xdi_mbox.data = NULL;
}
}
a->xdi_mbox.data_length);
if (ret > 0) {
diva_os_free(0, a->xdi_mbox.data);
- a->xdi_mbox.data = 0;
+ a->xdi_mbox.data = NULL;
a->xdi_mbox.status &= ~DIVA_XDI_MBOX_BUSY;
}
if ((clear_int_proc = a->clear_interrupts_proc)) {
(*clear_int_proc) (a);
- a->clear_interrupts_proc = 0;
+ a->clear_interrupts_proc = NULL;
return IRQ_HANDLED;
}
Create local mapping structure and init it to default state
*/
struct _diva_dma_map_entry* diva_alloc_dma_map (void* os_context, int nentries) {
- diva_dma_map_entry_t* pmap;
- if (!(pmap = diva_os_malloc (0, sizeof(*pmap)*(nentries+1))))
- return (0);
- memset (pmap, 0x00, sizeof(*pmap)*(nentries+1));
- return (pmap);
+ diva_dma_map_entry_t* pmap = diva_os_malloc(0, sizeof(*pmap)*(nentries+1));
+ if (pmap)
+ memset (pmap, 0, sizeof(*pmap)*(nentries+1));
+ return pmap;
}
/*
Free local map (context should be freed before) if any
static ssize_t
maint_read(struct file *file, char *buf, size_t count, loff_t * off)
{
- diva_dbg_entry_head_t *pmsg = 0;
+ diva_dbg_entry_head_t *pmsg = NULL;
diva_os_spin_lock_magic_t old_irql;
word size;
char *pstr, *dli_label = "UNK";
if (diva_os_copy_to_user(NULL, buf, pstr, str_length)) {
diva_os_free_tbuffer(0, str_msg);
- file->private_data = 0;
+ file->private_data = NULL;
return (-EFAULT);
}
str_msg[1] += str_length;
if ((str_msg[0] - str_msg[1]) <= 0) {
diva_os_free_tbuffer(0, str_msg);
- file->private_data = 0;
+ file->private_data = NULL;
}
return (str_length);
opened++;
up(&opened_sem);
- filep->private_data = 0;
+ filep->private_data = NULL;
return (0);
}
{
if (filep->private_data) {
diva_os_free_tbuffer(0, filep->private_data);
- filep->private_data = 0;
+ filep->private_data = NULL;
}
down(&opened_sem);
{
char tmprev[50];
int ret = 0;
- void *buffer = 0;
+ void *buffer = NULL;
do_gettimeofday(&start_time);
init_waitqueue_head(&msgwaitq);
req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback;
- req.didd_notify.info.context = 0;
+ req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) {
stop_dbg();
tasklet_kill(&pdpc->divas_task);
flush_scheduled_work();
mem = psoft_isr->object;
- psoft_isr->object = 0;
+ psoft_isr->object = NULL;
diva_os_free(0, mem);
}
}
static int __devinit divas_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
- void *pdiva = 0;
+ void *pdiva = NULL;
u8 pci_latency;
u8 new_latency = 32;
q->segments = max_segments;
for (i = 0; i < q->segments; i++) {
- q->data[i] = 0;
+ q->data[i] = NULL;
q->length[i] = 0;
}
q->read = q->write = q->count = q->segment_pending = 0;
if (q->data[i]) {
diva_os_free(0, q->data[i]);
}
- q->data[i] = 0;
+ q->data[i] = NULL;
q->length[i] = 0;
}
q->read = q->write = q->count = q->segment_pending = 0;
return (q->data[q->write]);
}
- return (0);
+ return NULL;
}
void
if (q->count) {
return (q->data[q->read]);
}
- return (0);
+ return NULL;
}
int diva_data_q_get_segment_length(const diva_um_idi_data_queue_t * q)
req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback;
- req.didd_notify.info.context = 0;
+ req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) {
stop_dbg();
int i;
if (!pLib) {
- return (0);
+ return NULL;
}
pmem += sizeof(*pLib);
if (!(pLib->hAdapter = SuperTraceOpenAdapter (Adapter))) {
diva_mnt_internal_dprintf (0, DLI_ERR, "Can not open XDI adapter");
- return (0);
+ return NULL;
}
pLib->Channels = SuperTraceGetNumberOfChannels (pLib->hAdapter);
byte* start;
int msg_length;
- if (*msg != ESC) return (0);
+ if (*msg != ESC) return NULL;
start = msg + 2;
msg_length = *(msg+1);
msg = (start+msg_length);
- if (*msg != ESC) return (0);
+ if (*msg != ESC) return NULL;
return ((diva_man_var_header_t*)msg);
}
}
a = &adapter[controller];
- plci = 0;
+ plci = NULL;
if ((msg->header.plci != 0) && (msg->header.plci <= a->max_plci) && !a->adapter_disabled)
{
dbug(1,dprintf("plci=%x",msg->header.plci));
}
else
{
- plci = 0;
+ plci = NULL;
}
}
dbug(1,dprintf("com=%x",msg->header.command));
if(p>length) return TRUE;
}
- if(parms) parms[i].info = 0;
+ if(parms) parms[i].info = NULL;
return FALSE;
}
for (j = 0; j < n; j++)
*(p++) = in[i].info[j];
}
- out->parms[i].info = 0;
+ out->parms[i].info = NULL;
out->parms[i].length = 0;
}
plci->internal_command = 0;
for (i = 0; i < MAX_INTERNAL_COMMAND_LEVELS; i++)
- plci->internal_command_queue[i] = 0;
+ plci->internal_command_queue[i] = NULL;
}
UnMapId (Id), (char *)(FILE_), __LINE__));
plci->internal_command = 0;
- plci->internal_command_queue[0] = 0;
+ plci->internal_command_queue[0] = NULL;
while (plci->internal_command_queue[1] != 0)
{
for (i = 0; i < MAX_INTERNAL_COMMAND_LEVELS - 1; i++)
plci->internal_command_queue[i] = plci->internal_command_queue[i+1];
- plci->internal_command_queue[MAX_INTERNAL_COMMAND_LEVELS - 1] = 0;
+ plci->internal_command_queue[MAX_INTERNAL_COMMAND_LEVELS - 1] = NULL;
(*(plci->internal_command_queue[0]))(Id, plci, OK);
if (plci->internal_command != 0)
return;
- plci->internal_command_queue[0] = 0;
+ plci->internal_command_queue[0] = NULL;
}
}
plci_free_msg_in_queue (plci);
plci->channels = 0;
- plci->appl = 0;
+ plci->appl = NULL;
if ((plci->State == INC_CON_PENDING) || (plci->State == INC_CON_ALERT))
plci->State = OUTG_DIS_PENDING;
}
{
word i;
API_PARSE * ai;
- PLCI * rc_plci = 0;
+ PLCI * rc_plci = NULL;
API_PARSE ai_parms[5];
word Info = 0;
relatedadapter = &adapter[MapController ((byte)(relatedPLCIvalue & 0x7f))-1];
relatedPLCIvalue >>=8;
/* find PLCI PTR*/
- for(i=0,rplci=0;i<relatedadapter->max_plci;i++)
+ for(i=0,rplci=NULL;i<relatedadapter->max_plci;i++)
{
if(relatedadapter->plci[i].Id == (byte)relatedPLCIvalue)
{
if(rc!=OK)
{
Info = 0x300E; /* not supported */
- plci->relatedPTYPLCI = 0;
+ plci->relatedPTYPLCI = NULL;
plci->ptyState = 0;
}
sendf(rplci->appl,
if(rc!=OK)
{
Info = 0x300E; /* not supported */
- plci->relatedPTYPLCI = 0;
+ plci->relatedPTYPLCI = NULL;
plci->ptyState = 0;
}
sendf(rplci->appl,
if(rc!=OK)
{
Info = 0x300E; /* not supported */
- plci->relatedPTYPLCI = 0;
+ plci->relatedPTYPLCI = NULL;
plci->ptyState = 0;
}
sendf(rplci->appl,
dbug(1,dprintf("Auto-Law assign failed"));
a->automatic_law = 3;
plci->internal_command = 0;
- a->automatic_lawPLCI = 0;
+ a->automatic_lawPLCI = NULL;
}
break;
}
plci->internal_command = 0;
sig_req(plci,REMOVE,0);
send_req(plci);
- a->automatic_lawPLCI = 0;
+ a->automatic_lawPLCI = NULL;
}
break;
}
byte *esc_profile = "";
byte facility[256];
- PLCI * tplci = 0;
+ PLCI * tplci = NULL;
byte chi[] = "\x02\x18\x01";
byte voice_cai[] = "\x06\x14\x00\x00\x00\x00\x08";
byte resume_cau[] = "\x05\x05\x00\x02\x00\x00";
plci->internal_command = 0;
sig_req(plci,REMOVE,0);
send_req(plci);
- a->automatic_lawPLCI = 0;
+ a->automatic_lawPLCI = NULL;
}
}
if (esc_profile[0])
{
force_mt_info = SendMultiIE(plci,Id,multi_fac_parms, FTY, 0x20, 0);
force_mt_info |= SendMultiIE(plci,Id,multi_pi_parms, PI, 0x210, 0);
- SendSSExtInd(0,plci,Id,multi_ssext_parms);
+ SendSSExtInd(NULL,plci,Id,multi_ssext_parms);
SendInfo(plci,Id, parms, force_mt_info);
VSwitchReqInd(plci,Id,multi_vswitch_parms);
{
WRITE_WORD(&SS_Ind[4],0x300E);
}
- plci->relatedPTYPLCI = 0;
+ plci->relatedPTYPLCI = NULL;
plci->ptyState = 0;
sendf(tplci->appl,_FACILITY_I,rId,0,"ws",3, SS_Ind);
break;
break;
case CONF_ADD:
WRITE_WORD(&CONF_Ind[1],S_CONF_ADD);
- plci->relatedPTYPLCI = 0;
+ plci->relatedPTYPLCI = NULL;
tplci=plci->relatedPTYPLCI;
if(tplci) tplci->ptyState = CONNECTED;
plci->ptyState = CONNECTED;
{
plci->ptyState = IDLE;
- plci->relatedPTYPLCI = 0;
+ plci->relatedPTYPLCI = NULL;
plci->ptyState = 0;
}
case S_3PTY_END:
plci->ptyState = IDLE;
- plci->relatedPTYPLCI = 0;
+ plci->relatedPTYPLCI = NULL;
plci->ptyState = 0;
dbug(1,dprintf("3PTY OFF"));
break;
/* and signal '+'.Appl must decide */
/* with connect_res if call must */
/* accepted or not */
- for(i=0, tplci=0;i<max_appl;i++){
+ for(i=0, tplci=NULL;i<max_appl;i++){
if(a->codec_listen[i]
&& (a->codec_listen[i]->State==INC_CON_PENDING
||a->codec_listen[i]->State==INC_CON_ALERT) ){
add_p(tplci, CAI, voice_cai);
add_p(tplci, OAD, a->TelOAD);
add_p(tplci, OSA, a->TelOSA);
- add_p(tplci,SHIFT|6,0);
+ add_p(tplci,SHIFT|6,NULL);
add_p(tplci,SIN,"\x02\x01\x00");
add_p(tplci,UID,"\x06\x43\x61\x70\x69\x32\x30");
sig_req(tplci,ASSIGN,DSIG_ID);
break;
case SSEXT_IND:
- SendSSExtInd(0,plci,Id,multi_ssext_parms);
+ SendSSExtInd(NULL,plci,Id,multi_ssext_parms);
break;
case VSWITCH_REQ:
Info_Number = 0x0008;
Info_Mask = 0x00;
cause[2] = ie[2];
- Info_Element = 0;
+ Info_Element = NULL;
break;
case 8: /* display */
dbug(1,dprintf("display(%d)",i));
plci->sig_req = 0;
plci->nl_req = 0;
- plci->appl = 0;
- plci->relatedPTYPLCI = 0;
+ plci->appl = NULL;
+ plci->relatedPTYPLCI = NULL;
plci->State = IDLE;
plci->SuppState = IDLE;
plci->channels = 0;
add_p(plci,CAI,"\x01\xc0");
add_p(plci,UID,"\x06\x43\x61\x70\x69\x32\x30");
add_p(plci,LLI,"\x01\xc4"); /* support Dummy CR FAC + MWI + SpoofNotify */
- add_p(plci,SHIFT|6,0);
+ add_p(plci,SHIFT|6,NULL);
add_p(plci,SIN,"\x02\x00\x00");
plci->internal_command = LISTEN_SIG_ASSIGN_PEND; /* do indicate_req if OK */
sig_req(plci,ASSIGN,DSIG_ID);
dbug(1,dprintf("remove temp codec PLCI"));
plci_remove(a->AdvCodecPLCI);
a->AdvCodecFLAG = 0;
- a->AdvCodecPLCI = 0;
- a->AdvSignalAppl = 0;
+ a->AdvCodecPLCI = NULL;
+ a->AdvSignalAppl = NULL;
}
- a->AdvSignalPLCI = 0;
+ a->AdvSignalPLCI = NULL;
}
}
a->Info_Mask[Id-1] = 0;
a->CIP_Mask[Id-1] = 0;
a->Notification_Mask[Id-1] = 0;
- a->codec_listen[Id-1] = 0;
+ a->codec_listen[Id-1] = NULL;
a->requested_options_table[Id-1] = 0;
for(j=0; j<a->max_plci; j++) /* and all PLCIs connected */
{ /* with this application */
}
if(plci->appl==this)
{
- plci->appl = 0;
+ plci->appl = NULL;
plci_remove(plci);
plci->State = IDLE;
}
add_p(plci,OAD,"\x01\xfd");
add_p(plci,CAI,"\x01\x80");
add_p(plci,UID,"\x06\x43\x61\x70\x69\x32\x30");
- add_p(plci,SHIFT|6,0);
+ add_p(plci,SHIFT|6,NULL);
add_p(plci,SIN,"\x02\x00\x00");
plci->internal_command = REM_L1_SIG_ASSIGN_PEND;
sig_req(plci,ASSIGN,DSIG_ID);
a->AdvCodecPLCI->tel = 0;
a->AdvCodecPLCI->adv_nl = 0;
}
- a->AdvSignalAppl = 0;
- a->AdvSignalPLCI = 0;
+ a->AdvSignalAppl = NULL;
+ a->AdvSignalPLCI = NULL;
a->AdvCodecFLAG = 0;
- a->AdvCodecPLCI = 0;
+ a->AdvCodecPLCI = NULL;
}
}
}
plci->Id = 0;
plci->State = IDLE;
plci->channels = 0;
- plci->appl = 0;
+ plci->appl = NULL;
plci->notifiedcall = 0;
}
listen_check(plci->adapter);
/*------------------------------------------------------------------*/
-LI_CONFIG *li_config_table = 0;
-word li_total_channels = 0;
+LI_CONFIG *li_config_table;
+word li_total_channels;
/*------------------------------------------------------------------*/
add_p(plci,OAD,"\x01\xfd");
add_p(plci,CAI,"\x01\x80");
add_p(plci,UID,"\x06\x43\x61\x70\x69\x32\x30");
- add_p(plci,SHIFT|6,0);
+ add_p(plci,SHIFT|6,NULL);
add_p(plci,SIN,"\x02\x00\x00");
plci->internal_command = START_L1_SIG_ASSIGN_PEND;
sig_req(plci,ASSIGN,DSIG_ID);
pReq->xdi_dma_descriptor_operation.info.operation = IDI_SYNC_REQ_DMA_DESCRIPTOR_ALLOC;
pReq->xdi_dma_descriptor_operation.info.descriptor_number = -1;
- pReq->xdi_dma_descriptor_operation.info.descriptor_address = 0;
+ pReq->xdi_dma_descriptor_operation.info.descriptor_address = NULL;
pReq->xdi_dma_descriptor_operation.info.descriptor_magic = 0;
e.user[0] = plci->adapter->Id - 1;
pReq->xdi_dma_descriptor_operation.info.operation = IDI_SYNC_REQ_DMA_DESCRIPTOR_FREE;
pReq->xdi_dma_descriptor_operation.info.descriptor_number = nr;
- pReq->xdi_dma_descriptor_operation.info.descriptor_address = 0;
+ pReq->xdi_dma_descriptor_operation.info.descriptor_address = NULL;
pReq->xdi_dma_descriptor_operation.info.descriptor_magic = 0;
e.user[0] = plci->adapter->Id - 1;
req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback;
- req.didd_notify.info.context = 0;
+ req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff)
return (0);
diva_os_spin_lock_magic_t old_irql;
word size;
diva_dbg_entry_head_t *pmsg;
- byte *pbuf = 0;
+ byte *pbuf = NULL;
int written = 0;
if (mask < 4096) {
#include "mi_pc.h"
#include "dsrv4bri.h"
-void *diva_xdiLoadFileFile = 0;
+void *diva_xdiLoadFileFile = NULL;
dword diva_xdiLoadFileLength = 0;
/*
(diva_os_xdi_adapter_t *) diva_os_malloc(0, sizeof(*a))))
{
diva_os_free(0, a->slave_adapters[0]);
- a->slave_adapters[0] = 0;
+ a->slave_adapters[0] = NULL;
diva_4bri_cleanup_adapter(a);
return (-1);
}
{
diva_os_free(0, a->slave_adapters[0]);
diva_os_free(0, a->slave_adapters[1]);
- a->slave_adapters[0] = 0;
- a->slave_adapters[1] = 0;
+ a->slave_adapters[0] = NULL;
+ a->slave_adapters[1] = NULL;
diva_4bri_cleanup_adapter(a);
return (-1);
}
if (!(a->slave_list = quadro_list)) {
for (i = 0; i < (tasks - 1); i++) {
diva_os_free(0, a->slave_adapters[i]);
- a->slave_adapters[i] = 0;
+ a->slave_adapters[i] = NULL;
}
diva_4bri_cleanup_adapter(a);
return (-1);
&& a->resources.pci.addr[bar]) {
divasa_unmap_pci_bar(a->resources.pci.addr[bar]);
a->resources.pci.bar[bar] = 0;
- a->resources.pci.addr[bar] = 0;
+ a->resources.pci.addr[bar] = NULL;
}
}
}
_4bri_bar_length[1],
&a->port_name[0], 1);
a->resources.pci.bar[1] = 0;
- a->resources.pci.addr[1] = 0;
+ a->resources.pci.addr[1] = NULL;
}
if (a->slave_list) {
diva_os_free(0, a->slave_list);
- a->slave_list = 0;
+ a->slave_list = NULL;
}
return (0);
diva_os_remove_soft_isr(&diva_current->xdi_adapter.
req_soft_isr);
- diva_current->xdi_adapter.isr_soft_isr.object = 0;
+ diva_current->xdi_adapter.isr_soft_isr.object = NULL;
if (diva_current->xdi_adapter.e_tbl) {
diva_os_free(0,
diva_current->xdi_adapter.
e_tbl);
}
- diva_current->xdi_adapter.e_tbl = 0;
+ diva_current->xdi_adapter.e_tbl = NULL;
diva_current->xdi_adapter.e_max = 0;
diva_current->xdi_adapter.e_count = 0;
}
if (FileLength) {
*FileLength = diva_xdiLoadFileLength;
}
- diva_xdiLoadFileFile = 0;
+ diva_xdiLoadFileFile = NULL;
diva_xdiLoadFileLength = 0;
return (ret);
ret = qBri_FPGA_download(&a->xdi_adapter);
- diva_xdiLoadFileFile = 0;
+ diva_xdiLoadFileFile = NULL;
diva_xdiLoadFileLength = 0;
return (ret ? 0 : -1);
if (a->clear_interrupts_proc) {
diva_4bri_clear_interrupts(a);
- a->clear_interrupts_proc = 0;
+ a->clear_interrupts_proc = NULL;
DBG_ERR(("A: A(%d) no final interrupt from 4BRI adapter",
IoAdapter->ANum))
}
if (a->resources.pci.addr[0] && a->resources.pci.bar[0]) {
divasa_unmap_pci_bar(a->resources.pci.addr[0]);
- a->resources.pci.addr[0] = 0;
+ a->resources.pci.addr[0] = NULL;
a->resources.pci.bar[0] = 0;
}
a->resources.pci.
length[i],
&a->port_name[0], i);
- a->resources.pci.addr[i] = 0;
+ a->resources.pci.addr[i] = NULL;
a->resources.pci.bar[i] = 0;
}
}
diva_os_cancel_soft_isr(&a->xdi_adapter.isr_soft_isr);
diva_os_remove_soft_isr(&a->xdi_adapter.req_soft_isr);
- a->xdi_adapter.isr_soft_isr.object = 0;
+ a->xdi_adapter.isr_soft_isr.object = NULL;
diva_os_destroy_spin_lock(&a->xdi_adapter.isr_spin_lock, "rm");
diva_os_destroy_spin_lock(&a->xdi_adapter.data_spin_lock, "rm");
*/
if (a->xdi_adapter.e_tbl) {
diva_os_free(0, a->xdi_adapter.e_tbl);
- a->xdi_adapter.e_tbl = 0;
+ a->xdi_adapter.e_tbl = NULL;
}
return (0);
diva_os_register_io_port(a, 0, a->resources.pci.bar[i],
a->resources.pci.length[i],
&a->port_name[0], i);
- a->resources.pci.addr[i] = 0;
+ a->resources.pci.addr[i] = NULL;
}
sprintf(a->port_name, "DIVA BRI %ld",
} while (i-- && a->clear_interrupts_proc);
if (a->clear_interrupts_proc) {
diva_bri_clear_interrupts(a);
- a->clear_interrupts_proc = 0;
+ a->clear_interrupts_proc = NULL;
DBG_ERR(("A: A(%d) no final interrupt from BRI adapter",
IoAdapter->ANum))
}
&& a->resources.pci.addr[bar]) {
divasa_unmap_pci_bar(a->resources.pci.addr[bar]);
a->resources.pci.bar[bar] = 0;
- a->resources.pci.addr[bar] = 0;
+ a->resources.pci.addr[bar] = NULL;
}
}
diva_os_cancel_soft_isr(&a->xdi_adapter.req_soft_isr);
diva_os_remove_soft_isr(&a->xdi_adapter.req_soft_isr);
- a->xdi_adapter.isr_soft_isr.object = 0;
+ a->xdi_adapter.isr_soft_isr.object = NULL;
diva_os_destroy_spin_lock(&a->xdi_adapter.isr_spin_lock, "rm");
diva_os_destroy_spin_lock(&a->xdi_adapter.data_spin_lock, "rm");
*/
if (a->xdi_adapter.e_tbl) {
diva_os_free(0, a->xdi_adapter.e_tbl);
- a->xdi_adapter.e_tbl = 0;
+ a->xdi_adapter.e_tbl = NULL;
}
a->xdi_adapter.Channels = 0;
a->xdi_adapter.e_max = 0;
diva_free_dma_map(a->resources.pci.hdev,
(struct _diva_dma_map_entry *) a->xdi_adapter.
dma_map);
- a->xdi_adapter.dma_map = 0;
+ a->xdi_adapter.dma_map = NULL;
/*
if (a->clear_interrupts_proc) {
diva_pri_clear_interrupts(a);
- a->clear_interrupts_proc = 0;
+ a->clear_interrupts_proc = NULL;
DBG_ERR(("A: A(%d) no final interrupt from PRI adapter",
IoAdapter->ANum))
}
------------------------------------------------------------------------ */
static void cleanup_entity(divas_um_idi_entity_t * e)
{
- e->os_ref = 0;
+ e->os_ref = NULL;
e->status = 0;
- e->adapter = 0;
+ e->adapter = NULL;
e->e.Id = 0;
e->rc_count = 0;
diva_os_malloc(0, diva_os_get_context_size()))) {
DBG_LOG(("E(%08x) no memory for os context", e));
diva_os_free(0, e);
- return (0);
+ return NULL;
}
memset(e->os_context, 0x00, diva_os_get_context_size());
if ((diva_data_q_init(&e->data, 2048 + 512, 16))) {
diva_os_free(0, e->os_context);
diva_os_free(0, e);
- return (0);
+ return NULL;
}
if ((diva_data_q_init(&e->rc, sizeof(diva_um_idi_ind_hdr_t), 2))) {
diva_data_q_finit(&e->data);
diva_os_free(0, e->os_context);
diva_os_free(0, e);
- return (0);
+ return NULL;
}
diva_os_enter_spin_lock(&adapter_lock, &old_irql, "create_entity");
diva_os_free(0, e->os_context);
diva_os_free(0, e);
- return (0);
+ return NULL;
}
e->os_ref = file; /* link to os handle */
e->e.IndCh = 0;
e->e.XNum = 0;
e->e.RNum = 0;
- e->e.callback = 0;
- e->e.X = 0;
- e->e.R = 0;
+ e->e.callback = NULL;
+ e->e.X = NULL;
+ e->e.R = NULL;
write_return_code(e, ASSIGN_RC | OUT_OF_RESOURCES);
return (-2);
} else {
if (rc != ASSIGN_OK) {
DBG_ERR(("A: A(%d) E(%08x) ASSIGN failed",
e->adapter->adapter_nr, e));
- e->e.callback = 0;
+ e->e.callback = NULL;
e->e.Id = 0;
e->e.Req = 0;
e->e.ReqCh = 0;
e->e.RcCh = 0;
e->e.Ind = 0;
e->e.IndCh = 0;
- e->e.X = 0;
- e->e.R = 0;
+ e->e.X = NULL;
+ e->e.R = NULL;
e->e.XNum = 0;
e->e.RNum = 0;
}
return (0); /* let us do it in the driver */
}
if ((e->e.Req == REMOVE) && (!e->e.Id)) { /* REMOVE COMPLETE */
- e->e.callback = 0;
+ e->e.callback = NULL;
e->e.Id = 0;
e->e.Req = 0;
e->e.ReqCh = 0;
e->e.RcCh = 0;
e->e.Ind = 0;
e->e.IndCh = 0;
- e->e.X = 0;
- e->e.R = 0;
+ e->e.X = NULL;
+ e->e.R = NULL;
e->e.XNum = 0;
e->e.RNum = 0;
e->rc_count = 0;
cards[i].protocol = protocol;
sprintf(id, "%s%d", name, i);
nrcards++;
- retval = checkcard(i, id, 0, hisax_d_if->owner);
+ retval = checkcard(i, id, NULL, hisax_d_if->owner);
if (retval == 0) { // yuck
cards[i].typ = 0;
nrcards--;
cs->writeisacfifo = &MemWriteISACfifo_IPACX;
cs->BC_Read_Reg = &MemReadHSCX_IPACX;
cs->BC_Write_Reg = &MemWriteHSCX_IPACX;
- cs->BC_Send_Data = 0; // function located in ipacx module
+ cs->BC_Send_Data = NULL; // function located in ipacx module
cs->irq_func = &diva_irq_ipacx_pci;
printk(KERN_INFO "Diva: IPACX Design Id: %x\n",
MemReadISAC_IPACX(cs, IPACX_ID) &0x3F);
if (status & UART_LSR_DR)
receive_chars(cs, &status);
if (status & UART_LSR_THRE)
- transmit_chars(cs, 0);
+ transmit_chars(cs, NULL);
if (pass_counter++ > RS_ISR_PASS_LIMIT) {
printk("rs_single loop break.\n");
break;
/**********/
/* macros */
/**********/
-#define write_usb(a,b,c) usb_control_msg((a)->dev,(a)->ctrl_out_pipe,0,0x40,(c),(b),0,0,HFC_CTRL_TIMEOUT)
+#define write_usb(a,b,c) usb_control_msg((a)->dev,(a)->ctrl_out_pipe,0,0x40,(c),(b),NULL,0,HFC_CTRL_TIMEOUT)
#define read_usb(a,b,c) usb_control_msg((a)->dev,(a)->ctrl_in_pipe,1,0xC0,0,(b),(c),1,HFC_CTRL_TIMEOUT)
/*************************************************/
{0x8e3, 0x0301, "Olitec USB RNIS", LED_SCHEME1, LED_NORMAL, {2,0,1,4}}, /* Olitec TA */
{0x675, 0x1688, "DrayTec USB ISDN TA", LED_SCHEME1, LED_NORMAL, {4,0,2,1}}, /* Draytec TA */
{0x7fa, 0x0846, "Bewan Modem RNIS USB", LED_SCHEME1, LED_INVERTED, {8,0x40,0x20,0x10}}, /* Bewan TA */
- {0,0,0} // EOL element
+ {0} // EOL element
};
/***************************************************/
if ((st->l2.tei != -1) && ((tei == GROUP_TEI) || (tei == st->l2.tei))) {
FsmDelTimer(&st->ma.t202, 5);
FsmChangeState(&st->ma.tei_m, ST_TEI_NOP);
- st->l3.l3l2(st, MDL_REMOVE | REQUEST, 0);
+ st->l3.l3l2(st, MDL_REMOVE | REQUEST, NULL);
cs = (struct IsdnCardState *) st->l1.hardware;
cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL);
}
FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 3);
} else {
st->ma.tei_m.printdebug(&st->ma.tei_m, "assign req failed");
- st->l3.l3l2(st, MDL_ERROR | RESPONSE, 0);
+ st->l3.l3l2(st, MDL_ERROR | RESPONSE, NULL);
cs = (struct IsdnCardState *) st->l1.hardware;
cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL);
FsmChangeState(fi, ST_TEI_NOP);
} else {
st->ma.tei_m.printdebug(&st->ma.tei_m,
"verify req for tei %d failed", st->l2.tei);
- st->l3.l3l2(st, MDL_REMOVE | REQUEST, 0);
+ st->l3.l3l2(st, MDL_REMOVE | REQUEST, NULL);
cs = (struct IsdnCardState *) st->l1.hardware;
cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL);
FsmChangeState(fi, ST_TEI_NOP);
interruptible_sleep_on(&(dev->info_waitq));
}
p = isdn_statstr();
- file->private_data = 0;
+ file->private_data = NULL;
if ((len = strlen(p)) <= count) {
if (copy_to_user(buf, p, len)) {
retval = -EFAULT;
retval = -ENOMEM;
goto out;
}
- len = isdn_readbchan(drvidx, chidx, p, 0, count,
+ len = isdn_readbchan(drvidx, chidx, p, NULL, count,
&dev->drv[drvidx]->rcv_waitq[chidx]);
*off += len;
if (copy_to_user(buf,p,len))
if (p) {
isdn_net_local *lp = p->local;
#ifdef CONFIG_ISDN_X25
- struct concap_proto *cprot = lp -> netdev -> cprot;
- struct concap_proto_ops *pops = cprot ? cprot -> pops : 0;
+ struct concap_proto *cprot = lp->netdev->cprot;
+ struct concap_proto_ops *pops = cprot ? cprot->pops : NULL;
#endif
switch (cmd) {
case ISDN_STAT_BSENT:
s = "dial suppressed: isdn system stopped";
else
s = "dial suppressed: dialmode `off'";
- isdn_net_unreachable(&p->dev, 0, s);
+ isdn_net_unreachable(&p->dev, NULL, s);
isdn_net_hangup(&p->dev);
break;
}
if (time_after(jiffies, lp->dialstarted + lp->dialtimeout)) {
lp->dialwait_timer = jiffies + lp->dialwait;
lp->dialstarted = 0;
- isdn_net_unreachable(&p->dev, 0, "dial: timed out");
+ isdn_net_unreachable(&p->dev, NULL, "dial: timed out");
isdn_net_hangup(&p->dev);
break;
}
if (lp->dialtimeout == 0) {
lp->dialwait_timer = jiffies + lp->dialwait;
lp->dialstarted = 0;
- isdn_net_unreachable(&p->dev, 0, "dial: tried all numbers dialmax times");
+ isdn_net_unreachable(&p->dev, NULL, "dial: tried all numbers dialmax times");
}
isdn_net_hangup(&p->dev);
break;
isdn_net_local *lp = (isdn_net_local *) d->priv;
isdn_ctrl cmd;
#ifdef CONFIG_ISDN_X25
- struct concap_proto *cprot = lp -> netdev -> cprot;
- struct concap_proto_ops *pops = cprot ? cprot -> pops : 0;
+ struct concap_proto *cprot = lp->netdev->cprot;
+ struct concap_proto_ops *pops = cprot ? cprot->pops : NULL;
#endif
if (lp->flags & ISDN_NET_CONNECTED) {
struct sk_buff *skb;
skb = alloc_skb(hl + len, GFP_ATOMIC);
- if (!skb) {
+ if (skb)
+ skb_reserve(skb, hl);
+ else
printk("isdn out of mem at %s:%d!\n", __FILE__, __LINE__);
- return 0;
- }
- skb_reserve(skb, hl);
return skb;
}
*my_eaz == 'b' || *my_eaz == 'B')
my_eaz++; /* skip to allow a match */
else
- my_eaz = 0; /* force non match */
+ my_eaz = NULL; /* force non match */
} else { /* it's a DATA call, check if we allow it */
if (*my_eaz == 'b' || *my_eaz == 'B')
my_eaz++; /* skip to allow a match */
if (c > 0) {
r = isdn_readbchan(info->isdn_driver, info->isdn_channel,
tty->flip.char_buf_ptr,
- tty->flip.flag_buf_ptr, c, 0);
+ tty->flip.flag_buf_ptr, c, NULL);
/* CISCO AsyncPPP Hack */
if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP))
memset(tty->flip.flag_buf_ptr, 0, r);
tty->driver->flush_buffer(tty);
if (tty->ldisc.flush_buffer)
tty->ldisc.flush_buffer(tty);
- info->tty = 0;
+ info->tty = NULL;
info->ncarrier = 0;
tty->closing = 0;
module_put(info->owner);
isdn_tty_shutdown(info);
info->count = 0;
info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE);
- info->tty = 0;
+ info->tty = NULL;
wake_up_interruptible(&info->open_wait);
}
isdn_tty_modem_reset_regs(info, 1);
info->magic = ISDN_ASYNC_MAGIC;
info->line = i;
- info->tty = 0;
+ info->tty = NULL;
info->x_char = 0;
info->count = 0;
info->blocked_open = 0;
char *p;
char c;
u_long flags;
- struct sk_buff *skb = 0;
- char *sp = 0;
+ struct sk_buff *skb = NULL;
+ char *sp = NULL;
if (!msg) {
printk(KERN_WARNING "isdn_tty: Null-Message in isdn_tty_at_cout\n");
MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
-static int mem[MAX_PCBIT_CARDS] = {0, };
-static int irq[MAX_PCBIT_CARDS] = {0, };
+static int mem[MAX_PCBIT_CARDS];
+static int irq[MAX_PCBIT_CARDS];
static int num_boards;
-struct pcbit_dev * dev_pcbit[MAX_PCBIT_CARDS] = {0, };
+struct pcbit_dev * dev_pcbit[MAX_PCBIT_CARDS];
extern void pcbit_terminate(int board);
extern int pcbit_init_dev(int board, int mem_base, int irq);
status = sendmessage(card, CMPID,cmReqType2,
cmReqClass0,
cmReqStartProc,
- 0,0,0);
+ 0,0,NULL);
pr_debug("%s: Sent startProc\n", sc_adapter[card]->devicename);
return status;
* Get the switch type from the board
*/
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0,
- ceReqCallGetSwitchType, 0, 0, 0, rcvmsg, SAR_TIMEOUT);
+ ceReqCallGetSwitchType, 0, 0, NULL, rcvmsg, SAR_TIMEOUT);
if (!status && !(rcvmsg->rsp_status)) {
pr_debug("%s: SCIOCGETSWITCH: command successful\n",
sc_adapter[card]->devicename);
* Get the spid from the board
*/
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0, ceReqCallGetSPID,
- data->channel, 0, 0, rcvmsg, SAR_TIMEOUT);
+ data->channel, 0, NULL, rcvmsg, SAR_TIMEOUT);
if (!status) {
pr_debug("%s: SCIOCGETSPID: command successful\n",
sc_adapter[card]->devicename);
* Get the dn from the board
*/
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0, ceReqCallGetMyNumber,
- data->channel, 0, 0, rcvmsg, SAR_TIMEOUT);
+ data->channel, 0, NULL, rcvmsg, SAR_TIMEOUT);
if (!status) {
pr_debug("%s: SCIOCGETDN: command successful\n",
sc_adapter[card]->devicename);
* Get the speed from the board
*/
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0,
- ceReqCallGetCallType, data->channel, 0, 0, rcvmsg, SAR_TIMEOUT);
+ ceReqCallGetCallType, data->channel, 0, NULL, rcvmsg, SAR_TIMEOUT);
if (!status && !(rcvmsg->rsp_status)) {
pr_debug("%s: SCIOCGETSPEED: command successful\n",
sc_adapter[card]->devicename);