Commit 7819d844 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: NULL noise in drivers/isdn

parent e2b2e3e3
...@@ -162,7 +162,7 @@ static int capincci_add_ack(struct capiminor *mp, u16 datahandle) ...@@ -162,7 +162,7 @@ static int capincci_add_ack(struct capiminor *mp, u16 datahandle)
printk(KERN_ERR "capi: alloc datahandle failed\n"); printk(KERN_ERR "capi: alloc datahandle failed\n");
return -1; return -1;
} }
n->next = 0; n->next = NULL;
n->datahandle = datahandle; n->datahandle = datahandle;
for (pp = &mp->ackqueue; *pp; pp = &(*pp)->next) ; for (pp = &mp->ackqueue; *pp; pp = &(*pp)->next) ;
*pp = n; *pp = n;
...@@ -211,7 +211,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) ...@@ -211,7 +211,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci)
mp = kmalloc(sizeof(*mp), GFP_ATOMIC); mp = kmalloc(sizeof(*mp), GFP_ATOMIC);
if (!mp) { if (!mp) {
printk(KERN_ERR "capi: can't alloc capiminor\n"); printk(KERN_ERR "capi: can't alloc capiminor\n");
return 0; return NULL;
} }
memset(mp, 0, sizeof(struct capiminor)); memset(mp, 0, sizeof(struct capiminor));
...@@ -245,7 +245,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) ...@@ -245,7 +245,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci)
if (!(minor < capi_ttyminors)) { if (!(minor < capi_ttyminors)) {
printk(KERN_NOTICE "capi: out of minors\n"); printk(KERN_NOTICE "capi: out of minors\n");
kfree(mp); kfree(mp);
return 0; return NULL;
} }
return mp; return mp;
...@@ -260,7 +260,7 @@ static void capiminor_free(struct capiminor *mp) ...@@ -260,7 +260,7 @@ static void capiminor_free(struct capiminor *mp)
write_unlock_irqrestore(&capiminor_list_lock, flags); write_unlock_irqrestore(&capiminor_list_lock, flags);
if (mp->ttyskb) kfree_skb(mp->ttyskb); if (mp->ttyskb) kfree_skb(mp->ttyskb);
mp->ttyskb = 0; mp->ttyskb = NULL;
skb_queue_purge(&mp->inqueue); skb_queue_purge(&mp->inqueue);
skb_queue_purge(&mp->outqueue); skb_queue_purge(&mp->outqueue);
capiminor_del_all_ack(mp); capiminor_del_all_ack(mp);
...@@ -292,17 +292,17 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci) ...@@ -292,17 +292,17 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci)
{ {
struct capincci *np, **pp; struct capincci *np, **pp;
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
struct capiminor *mp = 0; struct capiminor *mp = NULL;
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
np = kmalloc(sizeof(*np), GFP_ATOMIC); np = kmalloc(sizeof(*np), GFP_ATOMIC);
if (!np) if (!np)
return 0; return NULL;
memset(np, 0, sizeof(struct capincci)); memset(np, 0, sizeof(struct capincci));
np->ncci = ncci; np->ncci = ncci;
np->cdev = cdev; np->cdev = cdev;
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
mp = 0; mp = NULL;
if (cdev->userflags & CAPIFLAG_HIGHJACKING) if (cdev->userflags & CAPIFLAG_HIGHJACKING)
mp = np->minorp = capiminor_alloc(&cdev->ap, ncci); mp = np->minorp = capiminor_alloc(&cdev->ap, ncci);
if (mp) { if (mp) {
...@@ -339,7 +339,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci) ...@@ -339,7 +339,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci)
capifs_free_ncci(mp->minor); capifs_free_ncci(mp->minor);
#endif #endif
if (mp->tty) { if (mp->tty) {
mp->nccip = 0; mp->nccip = NULL;
#ifdef _DEBUG_REFCOUNT #ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "reset mp->nccip\n"); printk(KERN_DEBUG "reset mp->nccip\n");
#endif #endif
...@@ -377,7 +377,7 @@ static struct capidev *capidev_alloc(void) ...@@ -377,7 +377,7 @@ static struct capidev *capidev_alloc(void)
cdev = kmalloc(sizeof(*cdev), GFP_KERNEL); cdev = kmalloc(sizeof(*cdev), GFP_KERNEL);
if (!cdev) if (!cdev)
return 0; return NULL;
memset(cdev, 0, sizeof(struct capidev)); memset(cdev, 0, sizeof(struct capidev));
init_MUTEX(&cdev->ncci_list_sem); init_MUTEX(&cdev->ncci_list_sem);
...@@ -473,7 +473,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) ...@@ -473,7 +473,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => ldisc\n", printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => ldisc\n",
datahandle, skb->len); datahandle, skb->len);
#endif #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); kfree_skb(skb);
return 0; return 0;
...@@ -1026,8 +1026,8 @@ static void capinc_tty_close(struct tty_struct * tty, struct file * file) ...@@ -1026,8 +1026,8 @@ static void capinc_tty_close(struct tty_struct * tty, struct file * file)
#ifdef _DEBUG_REFCOUNT #ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "capinc_tty_close lastclose\n"); printk(KERN_DEBUG "capinc_tty_close lastclose\n");
#endif #endif
tty->driver_data = (void *)0; tty->driver_data = NULL;
mp->tty = 0; mp->tty = NULL;
} }
#ifdef _DEBUG_REFCOUNT #ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount)); printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount));
...@@ -1062,7 +1062,7 @@ static int capinc_tty_write(struct tty_struct * tty, int from_user, ...@@ -1062,7 +1062,7 @@ static int capinc_tty_write(struct tty_struct * tty, int from_user,
skb = mp->ttyskb; skb = mp->ttyskb;
if (skb) { if (skb) {
mp->ttyskb = 0; mp->ttyskb = NULL;
skb_queue_tail(&mp->outqueue, skb); skb_queue_tail(&mp->outqueue, skb);
mp->outbytes += skb->len; mp->outbytes += skb->len;
} }
...@@ -1075,7 +1075,8 @@ static int capinc_tty_write(struct tty_struct * tty, int from_user, ...@@ -1075,7 +1075,8 @@ static int capinc_tty_write(struct tty_struct * tty, int from_user,
skb_reserve(skb, CAPI_DATA_B3_REQ_LEN); skb_reserve(skb, CAPI_DATA_B3_REQ_LEN);
if (from_user) { 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); kfree_skb(skb);
#ifdef _DEBUG_TTYFUNCS #ifdef _DEBUG_TTYFUNCS
printk(KERN_DEBUG "capinc_tty_write: copy_from_user=%d\n", retval); printk(KERN_DEBUG "capinc_tty_write: copy_from_user=%d\n", retval);
...@@ -1115,7 +1116,7 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -1115,7 +1116,7 @@ static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
*(skb_put(skb, 1)) = ch; *(skb_put(skb, 1)) = ch;
return; return;
} }
mp->ttyskb = 0; mp->ttyskb = NULL;
skb_queue_tail(&mp->outqueue, skb); skb_queue_tail(&mp->outqueue, skb);
mp->outbytes += skb->len; mp->outbytes += skb->len;
(void)handle_minor_send(mp); (void)handle_minor_send(mp);
...@@ -1148,7 +1149,7 @@ static void capinc_tty_flush_chars(struct tty_struct *tty) ...@@ -1148,7 +1149,7 @@ static void capinc_tty_flush_chars(struct tty_struct *tty)
skb = mp->ttyskb; skb = mp->ttyskb;
if (skb) { if (skb) {
mp->ttyskb = 0; mp->ttyskb = NULL;
skb_queue_tail(&mp->outqueue, skb); skb_queue_tail(&mp->outqueue, skb);
mp->outbytes += skb->len; mp->outbytes += skb->len;
(void)handle_minor_send(mp); (void)handle_minor_send(mp);
...@@ -1466,7 +1467,7 @@ static void __init proc_init(void) ...@@ -1466,7 +1467,7 @@ static void __init proc_init(void)
for (i=0; i < nelem; i++) { for (i=0; i < nelem; i++) {
struct procfsentries *p = procfsentries + 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; if (p->procent) p->procent->read_proc = p->read_proc;
} }
} }
...@@ -1479,8 +1480,8 @@ static void __exit proc_exit(void) ...@@ -1479,8 +1480,8 @@ static void __exit proc_exit(void)
for (i=nelem-1; i >= 0; i--) { for (i=nelem-1; i >= 0; i--) {
struct procfsentries *p = procfsentries + i; struct procfsentries *p = procfsentries + i;
if (p->procent) { if (p->procent) {
remove_proc_entry(p->name, 0); remove_proc_entry(p->name, NULL);
p->procent = 0; p->procent = NULL;
} }
} }
} }
......
This diff is collapsed.
...@@ -30,8 +30,8 @@ struct capilib_ncci { ...@@ -30,8 +30,8 @@ struct capilib_ncci {
static inline void mq_init(struct capilib_ncci * np) static inline void mq_init(struct capilib_ncci * np)
{ {
u_int i; u_int i;
np->msgidqueue = 0; np->msgidqueue = NULL;
np->msgidlast = 0; np->msgidlast = NULL;
np->nmsg = 0; np->nmsg = 0;
memset(np->msgidpool, 0, sizeof(np->msgidpool)); memset(np->msgidpool, 0, sizeof(np->msgidpool));
np->msgidfree = &np->msgidpool[0]; np->msgidfree = &np->msgidpool[0];
...@@ -48,7 +48,7 @@ static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid) ...@@ -48,7 +48,7 @@ static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid)
return 0; return 0;
np->msgidfree = mq->next; np->msgidfree = mq->next;
mq->msgid = msgid; mq->msgid = msgid;
mq->next = 0; mq->next = NULL;
if (np->msgidlast) if (np->msgidlast)
np->msgidlast->next = mq; np->msgidlast->next = mq;
np->msgidlast = mq; np->msgidlast = mq;
...@@ -66,7 +66,7 @@ static inline int mq_dequeue(struct capilib_ncci * np, u16 msgid) ...@@ -66,7 +66,7 @@ static inline int mq_dequeue(struct capilib_ncci * np, u16 msgid)
struct capilib_msgidqueue *mq = *pp; struct capilib_msgidqueue *mq = *pp;
*pp = mq->next; *pp = mq->next;
if (mq == np->msgidlast) if (mq == np->msgidlast)
np->msgidlast = 0; np->msgidlast = NULL;
mq->next = np->msgidfree; mq->next = np->msgidfree;
np->msgidfree = mq; np->msgidfree = mq;
np->nmsg--; np->nmsg--;
......
...@@ -335,85 +335,54 @@ static _cdef cdef[] = ...@@ -335,85 +335,54 @@ static _cdef cdef[] =
static unsigned char *cpars[] = static unsigned char *cpars[] =
{ {
/*00 */ 0, /* ALERT_REQ */ [0x01] = "\x03\x04\x0c\x27\x2f\x1c\x01\x01",
/*01 ALERT_REQ */ (unsigned char *) "\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",
/*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", /* DISCONNECT_REQ */ [0x04] = "\x03\x04\x0c\x27\x2f\x1c\x01\x01",
/*03 */ 0, /* LISTEN_REQ */ [0x05] = "\x03\x25\x12\x13\x10\x11\x01",
/*04 DISCONNECT_REQ */ (unsigned char *) "\x03\x04\x0c\x27\x2f\x1c\x01\x01", /* INFO_REQ */ [0x08] = "\x03\x0e\x04\x0c\x27\x2f\x1c\x01\x01",
/*05 LISTEN_REQ */ (unsigned char *) "\x03\x25\x12\x13\x10\x11\x01", /* FACILITY_REQ */ [0x09] = "\x03\x1f\x1e\x01",
/*06 */ 0, /* SELECT_B_PROTOCOL_REQ */ [0x0a] = "\x03\x0d\x06\x08\x0a\x05\x07\x09\x01\x01",
/*07 */ 0, /* CONNECT_B3_REQ */ [0x0b] = "\x03\x2b\x01",
/*08 INFO_REQ */ (unsigned char *) "\x03\x0e\x04\x0c\x27\x2f\x1c\x01\x01", /* DISCONNECT_B3_REQ */ [0x0d] = "\x03\x2b\x01",
/*09 FACILITY_REQ */ (unsigned char *) "\x03\x1f\x1e\x01", /* DATA_B3_REQ */ [0x0f] = "\x03\x18\x1a\x19\x20\x01",
/*0a SELECT_B_PROTOCOL_REQ */ (unsigned char *) "\x03\x0d\x06\x08\x0a\x05\x07\x09\x01\x01", /* RESET_B3_REQ */ [0x10] = "\x03\x2b\x01",
/*0b CONNECT_B3_REQ */ (unsigned char *) "\x03\x2b\x01", /* ALERT_CONF */ [0x13] = "\x03\x23\x01",
/*0c */ 0, /* CONNECT_CONF */ [0x14] = "\x03\x23\x01",
/*0d DISCONNECT_B3_REQ */ (unsigned char *) "\x03\x2b\x01", /* DISCONNECT_CONF */ [0x16] = "\x03\x23\x01",
/*0e */ 0, /* LISTEN_CONF */ [0x17] = "\x03\x23\x01",
/*0f DATA_B3_REQ */ (unsigned char *) "\x03\x18\x1a\x19\x20\x01", /* MANUFACTURER_REQ */ [0x18] = "\x03\x2a\x15\x21\x29\x01",
/*10 RESET_B3_REQ */ (unsigned char *) "\x03\x2b\x01", /* INFO_CONF */ [0x1a] = "\x03\x23\x01",
/*11 */ 0, /* FACILITY_CONF */ [0x1b] = "\x03\x23\x1f\x1b\x01",
/*12 */ 0, /* SELECT_B_PROTOCOL_CONF */ [0x1c] = "\x03\x23\x01",
/*13 ALERT_CONF */ (unsigned char *) "\x03\x23\x01", /* CONNECT_B3_CONF */ [0x1d] = "\x03\x23\x01",
/*14 CONNECT_CONF */ (unsigned char *) "\x03\x23\x01", /* DISCONNECT_B3_CONF */ [0x1f] = "\x03\x23\x01",
/*15 */ 0, /* DATA_B3_CONF */ [0x21] = "\x03\x19\x23\x01",
/*16 DISCONNECT_CONF */ (unsigned char *) "\x03\x23\x01", /* RESET_B3_CONF */ [0x22] = "\x03\x23\x01",
/*17 LISTEN_CONF */ (unsigned char *) "\x03\x23\x01", /* CONNECT_IND */ [0x26] = "\x03\x14\x0e\x10\x0f\x11\x0b\x28\x22\x04\x0c\x27\x2f\x1c\x01\x01",
/*18 MANUFACTURER_REQ */ (unsigned char *) "\x03\x2a\x15\x21\x29\x01", /* CONNECT_ACTIVE_IND */ [0x27] = "\x03\x16\x17\x28\x01",
/*19 */ 0, /* DISCONNECT_IND */ [0x28] = "\x03\x2c\x01",
/*1a INFO_CONF */ (unsigned char *) "\x03\x23\x01", /* MANUFACTURER_CONF */ [0x2a] = "\x03\x2a\x15\x21\x29\x01",
/*1b FACILITY_CONF */ (unsigned char *) "\x03\x23\x1f\x1b\x01", /* INFO_IND */ [0x2c] = "\x03\x26\x24\x01",
/*1c SELECT_B_PROTOCOL_CONF */ (unsigned char *) "\x03\x23\x01", /* FACILITY_IND */ [0x2d] = "\x03\x1f\x1d\x01",
/*1d CONNECT_B3_CONF */ (unsigned char *) "\x03\x23\x01", /* CONNECT_B3_IND */ [0x2f] = "\x03\x2b\x01",
/*1e */ 0, /* CONNECT_B3_ACTIVE_IND */ [0x30] = "\x03\x2b\x01",
/*1f DISCONNECT_B3_CONF */ (unsigned char *) "\x03\x23\x01", /* DISCONNECT_B3_IND */ [0x31] = "\x03\x2d\x2b\x01",
/*20 */ 0, /* DATA_B3_IND */ [0x33] = "\x03\x18\x1a\x19\x20\x01",
/*21 DATA_B3_CONF */ (unsigned char *) "\x03\x19\x23\x01", /* RESET_B3_IND */ [0x34] = "\x03\x2b\x01",
/*22 RESET_B3_CONF */ (unsigned char *) "\x03\x23\x01", /* CONNECT_B3_T90_ACTIVE_IND */ [0x35] = "\x03\x2b\x01",
/*23 */ 0, /* CONNECT_RESP */ [0x38] = "\x03\x2e\x0d\x06\x08\x0a\x05\x07\x09\x01\x16\x17\x28\x04\x0c\x27\x2f\x1c\x01\x01",
/*24 */ 0, /* CONNECT_ACTIVE_RESP */ [0x39] = "\x03\x01",
/*25 */ 0, /* DISCONNECT_RESP */ [0x3a] = "\x03\x01",
/*26 CONNECT_IND */ (unsigned char *) "\x03\x14\x0e\x10\x0f\x11\x0b\x28\x22\x04\x0c\x27\x2f\x1c\x01\x01", /* MANUFACTURER_IND */ [0x3c] = "\x03\x2a\x15\x21\x29\x01",
/*27 CONNECT_ACTIVE_IND */ (unsigned char *) "\x03\x16\x17\x28\x01", /* INFO_RESP */ [0x3e] = "\x03\x01",
/*28 DISCONNECT_IND */ (unsigned char *) "\x03\x2c\x01", /* FACILITY_RESP */ [0x3f] = "\x03\x1f\x01",
/*29 */ 0, /* CONNECT_B3_RESP */ [0x41] = "\x03\x2e\x2b\x01",
/*2a MANUFACTURER_CONF */ (unsigned char *) "\x03\x2a\x15\x21\x29\x01", /* CONNECT_B3_ACTIVE_RESP */ [0x42] = "\x03\x01",
/*2b */ 0, /* DISCONNECT_B3_RESP */ [0x43] = "\x03\x01",
/*2c INFO_IND */ (unsigned char *) "\x03\x26\x24\x01", /* DATA_B3_RESP */ [0x45] = "\x03\x19\x01",
/*2d FACILITY_IND */ (unsigned char *) "\x03\x1f\x1d\x01", /* RESET_B3_RESP */ [0x46] = "\x03\x01",
/*2e */ 0, /* CONNECT_B3_T90_ACTIVE_RESP */ [0x47] = "\x03\x01",
/*2f CONNECT_B3_IND */ (unsigned char *) "\x03\x2b\x01", /* MANUFACTURER_RESP */ [0x4e] = "\x03\x2a\x15\x21\x29\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",
}; };
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
...@@ -623,85 +592,54 @@ unsigned capi_cmsg_header(_cmsg * cmsg, u16 _ApplId, ...@@ -623,85 +592,54 @@ unsigned capi_cmsg_header(_cmsg * cmsg, u16 _ApplId,
static char *mnames[] = static char *mnames[] =
{ {
0, [0x01] = "ALERT_REQ",
"ALERT_REQ", [0x02] = "CONNECT_REQ",
"CONNECT_REQ", [0x04] = "DISCONNECT_REQ",
0, [0x05] = "LISTEN_REQ",
"DISCONNECT_REQ", [0x08] = "INFO_REQ",
"LISTEN_REQ", [0x09] = "FACILITY_REQ",
0, [0x0a] = "SELECT_B_PROTOCOL_REQ",
0, [0x0b] = "CONNECT_B3_REQ",
"INFO_REQ", [0x0d] = "DISCONNECT_B3_REQ",
"FACILITY_REQ", [0x0f] = "DATA_B3_REQ",
"SELECT_B_PROTOCOL_REQ", [0x10] = "RESET_B3_REQ",
"CONNECT_B3_REQ", [0x13] = "ALERT_CONF",
0, [0x14] = "CONNECT_CONF",
"DISCONNECT_B3_REQ", [0x16] = "DISCONNECT_CONF",
0, [0x17] = "LISTEN_CONF",
"DATA_B3_REQ", [0x18] = "MANUFACTURER_REQ",
"RESET_B3_REQ", [0x1a] = "INFO_CONF",
0, [0x1b] = "FACILITY_CONF",
0, [0x1c] = "SELECT_B_PROTOCOL_CONF",
"ALERT_CONF", [0x1d] = "CONNECT_B3_CONF",
"CONNECT_CONF", [0x1f] = "DISCONNECT_B3_CONF",
0, [0x21] = "DATA_B3_CONF",
"DISCONNECT_CONF", [0x22] = "RESET_B3_CONF",
"LISTEN_CONF", [0x26] = "CONNECT_IND",
"MANUFACTURER_REQ", [0x27] = "CONNECT_ACTIVE_IND",
0, [0x28] = "DISCONNECT_IND",
"INFO_CONF", [0x2a] = "MANUFACTURER_CONF",
"FACILITY_CONF", [0x2c] = "INFO_IND",
"SELECT_B_PROTOCOL_CONF", [0x2d] = "FACILITY_IND",
"CONNECT_B3_CONF", [0x2f] = "CONNECT_B3_IND",
0, [0x30] = "CONNECT_B3_ACTIVE_IND",
"DISCONNECT_B3_CONF", [0x31] = "DISCONNECT_B3_IND",
0, [0x33] = "DATA_B3_IND",
"DATA_B3_CONF", [0x34] = "RESET_B3_IND",
"RESET_B3_CONF", [0x35] = "CONNECT_B3_T90_ACTIVE_IND",
0, [0x38] = "CONNECT_RESP",
0, [0x39] = "CONNECT_ACTIVE_RESP",
0, [0x3a] = "DISCONNECT_RESP",
"CONNECT_IND", [0x3c] = "MANUFACTURER_IND",
"CONNECT_ACTIVE_IND", [0x3e] = "INFO_RESP",
"DISCONNECT_IND", [0x3f] = "FACILITY_RESP",
0, [0x41] = "CONNECT_B3_RESP",
"MANUFACTURER_CONF", [0x42] = "CONNECT_B3_ACTIVE_RESP",
0, [0x43] = "DISCONNECT_B3_RESP",
"INFO_IND", [0x45] = "DATA_B3_RESP",
"FACILITY_IND", [0x46] = "RESET_B3_RESP",
0, [0x47] = "CONNECT_B3_T90_ACTIVE_RESP",
"CONNECT_B3_IND", [0x4e] = "MANUFACTURER_RESP"
"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"
}; };
char *capi_cmd2str(u8 cmd, u8 subcmd) char *capi_cmd2str(u8 cmd, u8 subcmd)
...@@ -715,9 +653,9 @@ char *capi_cmd2str(u8 cmd, u8 subcmd) ...@@ -715,9 +653,9 @@ char *capi_cmd2str(u8 cmd, u8 subcmd)
static char *pnames[] = static char *pnames[] =
{ {
/*00 */ 0, /*00 */ NULL,
/*01 */ 0, /*01 */ NULL,
/*02 */ 0, /*02 */ NULL,
/*03 */ "Controller/PLCI/NCCI", /*03 */ "Controller/PLCI/NCCI",
/*04 */ "AdditionalInfo", /*04 */ "AdditionalInfo",
/*05 */ "B1configuration", /*05 */ "B1configuration",
...@@ -767,7 +705,7 @@ static char *pnames[] = ...@@ -767,7 +705,7 @@ static char *pnames[] =
static char buf[8192]; static char buf[8192];
static char *p = 0; static char *p = NULL;
#include <stdarg.h> #include <stdarg.h>
......
...@@ -193,7 +193,7 @@ static void notify_down(u32 contr) ...@@ -193,7 +193,7 @@ static void notify_down(u32 contr)
for (applid = 1; applid <= CAPI_MAXAPPL; applid++) { for (applid = 1; applid <= CAPI_MAXAPPL; applid++) {
ap = get_capi_appl_by_nr(applid); ap = get_capi_appl_by_nr(applid);
if (ap && ap->callback && !ap->release_in_progress) if (ap && ap->callback && !ap->release_in_progress)
ap->callback(KCI_CONTRDOWN, contr, 0); ap->callback(KCI_CONTRDOWN, contr, NULL);
} }
} }
...@@ -421,7 +421,7 @@ attach_capi_ctr(struct capi_ctr *card) ...@@ -421,7 +421,7 @@ attach_capi_ctr(struct capi_ctr *card)
card->traceflag = showcapimsgs; card->traceflag = showcapimsgs;
sprintf(card->procfn, "capi/controllers/%d", card->cnr); 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) { if (card->procent) {
card->procent->read_proc = card->procent->read_proc =
(int (*)(char *,char **,off_t,int,int *,void *)) (int (*)(char *,char **,off_t,int,int *,void *))
...@@ -445,8 +445,8 @@ int detach_capi_ctr(struct capi_ctr *card) ...@@ -445,8 +445,8 @@ int detach_capi_ctr(struct capi_ctr *card)
ncards--; ncards--;
if (card->procent) { if (card->procent) {
remove_proc_entry(card->procfn, 0); remove_proc_entry(card->procfn, NULL);
card->procent = 0; card->procent = NULL;
} }
capi_cards[card->cnr - 1] = NULL; capi_cards[card->cnr - 1] = NULL;
printk(KERN_NOTICE "kcapi: Controller %d: %s unregistered\n", printk(KERN_NOTICE "kcapi: Controller %d: %s unregistered\n",
...@@ -524,7 +524,7 @@ u16 capi20_register(struct capi20_appl *ap) ...@@ -524,7 +524,7 @@ u16 capi20_register(struct capi20_appl *ap)
ap->nrecvdatapkt = 0; ap->nrecvdatapkt = 0;
ap->nsentctlpkt = 0; ap->nsentctlpkt = 0;
ap->nsentdatapkt = 0; ap->nsentdatapkt = 0;
ap->callback = 0; ap->callback = NULL;
init_MUTEX(&ap->recv_sem); init_MUTEX(&ap->recv_sem);
skb_queue_head_init(&ap->recv_queue); skb_queue_head_init(&ap->recv_queue);
INIT_WORK(&ap->recv_work, recv_handler, (void *)ap); INIT_WORK(&ap->recv_work, recv_handler, (void *)ap);
...@@ -718,7 +718,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data) ...@@ -718,7 +718,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data)
avmb1_resetdef rdef; avmb1_resetdef rdef;
capicardparams cparams; capicardparams cparams;
struct capi_ctr *card; struct capi_ctr *card;
struct capi_driver *driver = 0; struct capi_driver *driver = NULL;
capiloaddata ldata; capiloaddata ldata;
struct list_head *l; struct list_head *l;
unsigned long flags; unsigned long flags;
...@@ -758,7 +758,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data) ...@@ -758,7 +758,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data)
} }
break; break;
default: default:
driver = 0; driver = NULL;
break; break;
} }
if (!driver) { if (!driver) {
...@@ -784,7 +784,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data) ...@@ -784,7 +784,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data)
sizeof(avmb1_loaddef))) sizeof(avmb1_loaddef)))
return -EFAULT; return -EFAULT;
ldef.t4config.len = 0; ldef.t4config.len = 0;
ldef.t4config.data = 0; ldef.t4config.data = NULL;
} else { } else {
if (copy_from_user((void *)&ldef, data, if (copy_from_user((void *)&ldef, data,
sizeof(avmb1_loadandconfigdef))) sizeof(avmb1_loadandconfigdef)))
...@@ -901,7 +901,7 @@ int capi20_manufacturer(unsigned int cmd, void *data) ...@@ -901,7 +901,7 @@ int capi20_manufacturer(unsigned int cmd, void *data)
case KCAPI_CMD_ADDCARD: case KCAPI_CMD_ADDCARD:
{ {
struct list_head *l; struct list_head *l;
struct capi_driver *driver = 0; struct capi_driver *driver = NULL;
capicardparams cparams; capicardparams cparams;
kcapi_carddef cdef; kcapi_carddef cdef;
int retval; int retval;
......
...@@ -246,7 +246,7 @@ create_seq_entry(char *name, mode_t mode, struct file_operations *f) ...@@ -246,7 +246,7 @@ create_seq_entry(char *name, mode_t mode, struct file_operations *f)
static __inline__ struct capi_driver *capi_driver_get_idx(loff_t pos) 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; struct list_head *l;
loff_t i; loff_t i;
...@@ -256,7 +256,7 @@ static __inline__ struct capi_driver *capi_driver_get_idx(loff_t pos) ...@@ -256,7 +256,7 @@ static __inline__ struct capi_driver *capi_driver_get_idx(loff_t pos)
if (i++ == pos) if (i++ == pos)
return drv; return drv;
} }
return 0; return NULL;
} }
static void *capi_driver_start(struct seq_file *seq, loff_t *pos) static void *capi_driver_start(struct seq_file *seq, loff_t *pos)
...@@ -271,7 +271,7 @@ static void *capi_driver_next(struct seq_file *seq, void *v, loff_t *pos) ...@@ -271,7 +271,7 @@ static void *capi_driver_next(struct seq_file *seq, void *v, loff_t *pos)
{ {
struct capi_driver *drv = (struct capi_driver *)v; struct capi_driver *drv = (struct capi_driver *)v;
++*pos; ++*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); return list_entry(drv->list.next, struct capi_driver, list);
} }
......
...@@ -228,7 +228,7 @@ void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...) ...@@ -228,7 +228,7 @@ void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...)
word length = 12, dlength = 0; word length = 12, dlength = 0;
byte *write; byte *write;
CAPI_MSG msg; CAPI_MSG msg;
byte *string = 0; byte *string = NULL;
va_list ap; va_list ap;
diva_os_message_buffer_s *dmb; diva_os_message_buffer_s *dmb;
diva_card *card = NULL; diva_card *card = NULL;
...@@ -1072,7 +1072,7 @@ static int divacapi_connect_didd(void) ...@@ -1072,7 +1072,7 @@ static int divacapi_connect_didd(void)
req.didd_notify.e.Rc = req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY; IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback; req.didd_notify.info.callback = (void *)didd_callback;
req.didd_notify.info.context = 0; req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req); DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) { if (req.didd_notify.e.Rc != 0xff) {
stop_dbg(); stop_dbg();
......
...@@ -102,8 +102,8 @@ static int diva_ctl_read_proc(char *page, char **start, off_t off, ...@@ -102,8 +102,8 @@ static int diva_ctl_read_proc(char *page, char **start, off_t off,
void diva_os_set_controller_struct(struct capi_ctr *ctrl) void diva_os_set_controller_struct(struct capi_ctr *ctrl)
{ {
ctrl->driver_name = DRIVERLNAME; ctrl->driver_name = DRIVERLNAME;
ctrl->load_firmware = 0; ctrl->load_firmware = NULL;
ctrl->reset_ctr = 0; ctrl->reset_ctr = NULL;
ctrl->ctr_read_proc = diva_ctl_read_proc; ctrl->ctr_read_proc = diva_ctl_read_proc;
ctrl->owner = THIS_MODULE; ctrl->owner = THIS_MODULE;
} }
......
...@@ -293,8 +293,8 @@ static void diva_remove_adapter_callback (dword handle) { ...@@ -293,8 +293,8 @@ static void diva_remove_adapter_callback (dword handle) {
diva_os_spin_lock_magic_t irql; diva_os_spin_lock_magic_t irql;
if (handle && ((--handle) < DIVA_DIDD_MAX_NOTIFICATIONS)) { if (handle && ((--handle) < DIVA_DIDD_MAX_NOTIFICATIONS)) {
diva_os_enter_spin_lock (&didd_spin, &irql, "didd_nfy_rm"); diva_os_enter_spin_lock (&didd_spin, &irql, "didd_nfy_rm");
NotificationTable[handle].callback = 0; NotificationTable[handle].callback = NULL;
NotificationTable[handle].context = 0; NotificationTable[handle].context = NULL;
diva_os_leave_spin_lock (&didd_spin, &irql, "didd_nfy_rm"); diva_os_leave_spin_lock (&didd_spin, &irql, "didd_nfy_rm");
DBG_TRC(("Remove adapter notification[%d]", (int)(handle+1))) DBG_TRC(("Remove adapter notification[%d]", (int)(handle+1)))
return; return;
......
...@@ -89,7 +89,7 @@ static void queueInit (MSG_QUEUE *Q, byte *Buffer, dword sizeBuffer) { ...@@ -89,7 +89,7 @@ static void queueInit (MSG_QUEUE *Q, byte *Buffer, dword sizeBuffer) {
Q->Size = sizeBuffer; Q->Size = sizeBuffer;
Q->Base = Q->Head = Q->Tail = Buffer; Q->Base = Q->Head = Q->Tail = Buffer;
Q->High = Buffer + sizeBuffer; Q->High = Buffer + sizeBuffer;
Q->Wrap = 0; Q->Wrap = NULL;
Q->Count= 0; Q->Count= 0;
} }
...@@ -107,7 +107,7 @@ static byte *queueAllocMsg (MSG_QUEUE *Q, word size) { ...@@ -107,7 +107,7 @@ static byte *queueAllocMsg (MSG_QUEUE *Q, word size) {
if (Q->Tail == Q->Head) { if (Q->Tail == Q->Head) {
if (Q->Wrap || need > Q->Size) { if (Q->Wrap || need > Q->Size) {
return(0); /* full */ return NULL; /* full */
} }
goto alloc; /* empty */ goto alloc; /* empty */
} }
...@@ -115,7 +115,7 @@ static byte *queueAllocMsg (MSG_QUEUE *Q, word size) { ...@@ -115,7 +115,7 @@ static byte *queueAllocMsg (MSG_QUEUE *Q, word size) {
if (Q->Tail > Q->Head) { if (Q->Tail > Q->Head) {
if (Q->Tail + need <= Q->High) goto alloc; /* append */ if (Q->Tail + need <= Q->High) goto alloc; /* append */
if (Q->Base + need > Q->Head) { if (Q->Base + need > Q->Head) {
return (0); /* too much */ return NULL; /* too much */
} }
/* wraparound the queue (but not the message) */ /* wraparound the queue (but not the message) */
Q->Wrap = Q->Tail; Q->Wrap = Q->Tail;
...@@ -124,7 +124,7 @@ static byte *queueAllocMsg (MSG_QUEUE *Q, word size) { ...@@ -124,7 +124,7 @@ static byte *queueAllocMsg (MSG_QUEUE *Q, word size) {
} }
if (Q->Tail + need > Q->Head) { if (Q->Tail + need > Q->Head) {
return (0); /* too much */ return NULL; /* too much */
} }
alloc: alloc:
...@@ -151,7 +151,7 @@ static void queueFreeMsg (MSG_QUEUE *Q) { ...@@ -151,7 +151,7 @@ static void queueFreeMsg (MSG_QUEUE *Q) {
if (Q->Wrap) { if (Q->Wrap) {
if (Q->Head >= Q->Wrap) { if (Q->Head >= Q->Wrap) {
Q->Head = Q->Base; Q->Head = Q->Base;
Q->Wrap = 0; Q->Wrap = NULL;
} }
} else if (Q->Head >= Q->Tail) { } else if (Q->Head >= Q->Tail) {
Q->Head = Q->Tail = Q->Base; Q->Head = Q->Tail = Q->Base;
...@@ -167,7 +167,7 @@ static byte *queuePeekMsg (MSG_QUEUE *Q, word *size) { ...@@ -167,7 +167,7 @@ static byte *queuePeekMsg (MSG_QUEUE *Q, word *size) {
if (((byte *)Msg == Q->Tail && !Q->Wrap) || if (((byte *)Msg == Q->Tail && !Q->Wrap) ||
(Msg->Size & MSG_INCOMPLETE)) { (Msg->Size & MSG_INCOMPLETE)) {
return (0); return NULL;
} else { } else {
*size = Msg->Size; *size = Msg->Size;
return ((byte *)(Msg + 1)); return ((byte *)(Msg + 1));
...@@ -177,13 +177,13 @@ static byte *queuePeekMsg (MSG_QUEUE *Q, word *size) { ...@@ -177,13 +177,13 @@ static byte *queuePeekMsg (MSG_QUEUE *Q, word *size) {
/* /*
Message queue header Message queue header
*/ */
static MSG_QUEUE* dbg_queue = 0; static MSG_QUEUE* dbg_queue;
static byte* dbg_base = 0; static byte* dbg_base;
static int external_dbg_queue = 0; static int external_dbg_queue;
static diva_os_spin_lock_t dbg_q_lock; static diva_os_spin_lock_t dbg_q_lock;
static diva_os_spin_lock_t dbg_adapter_lock; static diva_os_spin_lock_t dbg_adapter_lock;
static int dbg_q_busy = 0; static int dbg_q_busy;
static volatile dword dbg_sequence = 0; static volatile dword dbg_sequence;
static dword start_sec; static dword start_sec;
static dword start_usec; static dword start_usec;
...@@ -235,16 +235,16 @@ int diva_maint_init (byte* base, unsigned long length, int do_init) { ...@@ -235,16 +235,16 @@ int diva_maint_init (byte* base, unsigned long length, int do_init) {
if (diva_os_initialize_spin_lock (&dbg_q_lock, "dbg_init")) { if (diva_os_initialize_spin_lock (&dbg_q_lock, "dbg_init")) {
dbg_queue = 0; dbg_queue = NULL;
dbg_base = 0; dbg_base = NULL;
external_dbg_queue = 0; external_dbg_queue = 0;
return (-1); return (-1);
} }
if (diva_os_initialize_spin_lock (&dbg_adapter_lock, "dbg_init")) { if (diva_os_initialize_spin_lock (&dbg_adapter_lock, "dbg_init")) {
diva_os_destroy_spin_lock(&dbg_q_lock, "dbg_init"); diva_os_destroy_spin_lock(&dbg_q_lock, "dbg_init");
dbg_queue = 0; dbg_queue = NULL;
dbg_base = 0; dbg_base = NULL;
external_dbg_queue = 0; external_dbg_queue = 0;
return (-1); return (-1);
} }
...@@ -263,8 +263,8 @@ void* diva_maint_finit (void) { ...@@ -263,8 +263,8 @@ void* diva_maint_finit (void) {
void* ret = (void*)dbg_base; void* ret = (void*)dbg_base;
int i; int i;
dbg_queue = 0; dbg_queue = NULL;
dbg_base = 0; dbg_base = NULL;
if (ret) { if (ret) {
diva_os_destroy_spin_lock(&dbg_q_lock, "dbg_finit"); diva_os_destroy_spin_lock(&dbg_q_lock, "dbg_finit");
...@@ -272,7 +272,7 @@ void* diva_maint_finit (void) { ...@@ -272,7 +272,7 @@ void* diva_maint_finit (void) {
} }
if (external_dbg_queue) { if (external_dbg_queue) {
ret = 0; ret = NULL;
} }
external_dbg_queue = 0; external_dbg_queue = 0;
...@@ -300,12 +300,12 @@ dword diva_dbg_q_length (void) { ...@@ -300,12 +300,12 @@ dword diva_dbg_q_length (void) {
*/ */
diva_dbg_entry_head_t* diva_maint_get_message (word* size, diva_dbg_entry_head_t* diva_maint_get_message (word* size,
diva_os_spin_lock_magic_t* old_irql) { 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"); diva_os_enter_spin_lock_hard (&dbg_q_lock, old_irql, "read");
if (dbg_q_busy) { if (dbg_q_busy) {
diva_os_leave_spin_lock_hard (&dbg_q_lock, old_irql, "read_busy"); diva_os_leave_spin_lock_hard (&dbg_q_lock, old_irql, "read_busy");
return (0); return NULL;
} }
dbg_q_busy = 1; dbg_q_busy = 1;
...@@ -406,7 +406,7 @@ static void DI_register (void *arg) { ...@@ -406,7 +406,7 @@ static void DI_register (void *arg) {
} }
if (free_id != -1) { if (free_id != -1) {
diva_dbg_entry_head_t* pmsg = 0; diva_dbg_entry_head_t* pmsg = NULL;
int len; int len;
char tmp[256]; char tmp[256];
word size; word size;
...@@ -476,7 +476,7 @@ static void DI_deregister (pDbgHandle hDbg) { ...@@ -476,7 +476,7 @@ static void DI_deregister (pDbgHandle hDbg) {
dword sec, usec; dword sec, usec;
int i; int i;
word size; word size;
byte* pmem = 0; byte* pmem = NULL;
diva_os_get_time (&sec, &usec); diva_os_get_time (&sec, &usec);
...@@ -489,24 +489,24 @@ static void DI_deregister (pDbgHandle hDbg) { ...@@ -489,24 +489,24 @@ static void DI_deregister (pDbgHandle hDbg) {
char tmp[256]; char tmp[256];
int len; int len;
clients[i].hDbg = 0; clients[i].hDbg = NULL;
hDbg->id = -1; hDbg->id = -1;
hDbg->dbgMask = 0; hDbg->dbgMask = 0;
hDbg->dbg_end = 0; hDbg->dbg_end = NULL;
hDbg->dbg_prt = 0; hDbg->dbg_prt = NULL;
hDbg->dbg_irq = 0; hDbg->dbg_irq = NULL;
if (hDbg->Version > 0) if (hDbg->Version > 0)
hDbg->dbg_old = 0; hDbg->dbg_old = NULL;
hDbg->Registered = 0; hDbg->Registered = 0;
hDbg->next = 0; hDbg->next = NULL;
if (clients[i].pIdiLib) { if (clients[i].pIdiLib) {
(*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib); (*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib);
clients[i].pIdiLib = 0; clients[i].pIdiLib = NULL;
pmem = clients[i].pmem; pmem = clients[i].pmem;
clients[i].pmem = 0; clients[i].pmem = NULL;
} }
/* /*
...@@ -565,7 +565,7 @@ static void DI_format (int do_lock, ...@@ -565,7 +565,7 @@ static void DI_format (int do_lock,
va_list ap) { va_list ap) {
diva_os_spin_lock_magic_t old_irql; diva_os_spin_lock_magic_t old_irql;
dword sec, usec; dword sec, usec;
diva_dbg_entry_head_t* pmsg = 0; diva_dbg_entry_head_t* pmsg = NULL;
dword length; dword length;
word size; word size;
static char fmtBuf[MSG_FRAME_MAX_SIZE+sizeof(*pmsg)+1]; static char fmtBuf[MSG_FRAME_MAX_SIZE+sizeof(*pmsg)+1];
...@@ -843,7 +843,7 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) { ...@@ -843,7 +843,7 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) {
dword sec, usec, logical, serial, org_mask; dword sec, usec, logical, serial, org_mask;
int id, best_id = 0, free_id = -1; int id, best_id = 0, free_id = -1;
char tmp[256]; char tmp[256];
diva_dbg_entry_head_t* pmsg = 0; diva_dbg_entry_head_t* pmsg = NULL;
int len; int len;
word size; word size;
byte* pmem; byte* pmem;
...@@ -938,7 +938,7 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) { ...@@ -938,7 +938,7 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) {
if (((*(clients[id].pIdiLib->DivaSTraceLibraryStart))(clients[id].pIdiLib->hLib))) { if (((*(clients[id].pIdiLib->DivaSTraceLibraryStart))(clients[id].pIdiLib->hLib))) {
diva_mnt_internal_dprintf (0, DLI_ERR, "Adapter(%d) Start failed", (int)logical); diva_mnt_internal_dprintf (0, DLI_ERR, "Adapter(%d) Start failed", (int)logical);
(*(clients[id].pIdiLib->DivaSTraceLibraryFinit))(clients[id].pIdiLib->hLib); (*(clients[id].pIdiLib->DivaSTraceLibraryFinit))(clients[id].pIdiLib->hLib);
clients[id].pIdiLib = 0; clients[id].pIdiLib = NULL;
} }
} else { } else {
diva_mnt_internal_dprintf (0, DLI_ERR, "A(%d) management init failed", (int)logical); diva_mnt_internal_dprintf (0, DLI_ERR, "A(%d) management init failed", (int)logical);
...@@ -946,9 +946,9 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) { ...@@ -946,9 +946,9 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) {
} }
if (!clients[id].pIdiLib) { if (!clients[id].pIdiLib) {
clients[id].request = 0; clients[id].request = NULL;
clients[id].request_pending = 0; 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_q_lock, &old_irql, "register");
diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register"); diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register");
diva_os_free (0, pmem); diva_os_free (0, pmem);
...@@ -1008,7 +1008,7 @@ void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d) { ...@@ -1008,7 +1008,7 @@ void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d) {
dword sec, usec; dword sec, usec;
int i; int i;
word size; word size;
byte* pmem = 0; byte* pmem = NULL;
diva_os_get_time (&sec, &usec); diva_os_get_time (&sec, &usec);
...@@ -1023,14 +1023,14 @@ void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d) { ...@@ -1023,14 +1023,14 @@ void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d) {
if (clients[i].pIdiLib) { if (clients[i].pIdiLib) {
(*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib); (*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib);
clients[i].pIdiLib = 0; clients[i].pIdiLib = NULL;
pmem = clients[i].pmem; pmem = clients[i].pmem;
clients[i].pmem = 0; clients[i].pmem = NULL;
} }
clients[i].hDbg = 0; clients[i].hDbg = NULL;
clients[i].request = 0; clients[i].request = NULL;
clients[i].request_pending = 0; clients[i].request_pending = 0;
/* /*
...@@ -1092,7 +1092,7 @@ void* SuperTraceOpenAdapter (int AdapterNumber) { ...@@ -1092,7 +1092,7 @@ void* SuperTraceOpenAdapter (int AdapterNumber) {
} }
} }
return (0); return NULL;
} }
int SuperTraceCloseAdapter (void* AdapterHandle) { int SuperTraceCloseAdapter (void* AdapterHandle) {
...@@ -1741,7 +1741,7 @@ int diva_mnt_shutdown_xdi_adapters (void) { ...@@ -1741,7 +1741,7 @@ int diva_mnt_shutdown_xdi_adapters (void) {
for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { 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_adapter_lock, &old_irql1, "unload");
diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "unload"); diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "unload");
...@@ -1753,13 +1753,13 @@ int diva_mnt_shutdown_xdi_adapters (void) { ...@@ -1753,13 +1753,13 @@ int diva_mnt_shutdown_xdi_adapters (void) {
*/ */
if (clients[i].pIdiLib) { if (clients[i].pIdiLib) {
(*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib); (*(clients[i].pIdiLib->DivaSTraceLibraryFinit))(clients[i].pIdiLib->hLib);
clients[i].pIdiLib = 0; clients[i].pIdiLib = NULL;
pmem = clients[i].pmem; pmem = clients[i].pmem;
clients[i].pmem = 0; clients[i].pmem = NULL;
} }
clients[i].hDbg = 0; clients[i].hDbg = NULL;
clients[i].request = 0; clients[i].request = NULL;
clients[i].request_pending = 0; clients[i].request_pending = 0;
} else { } else {
fret = -1; fret = -1;
......
...@@ -81,7 +81,7 @@ static void xdi_xlog_ind (byte Adapter, ...@@ -81,7 +81,7 @@ static void xdi_xlog_ind (byte Adapter,
void pr_out(ADAPTER * a) void pr_out(ADAPTER * a)
{ {
byte e_no; byte e_no;
ENTITY * this = 0; ENTITY * this = NULL;
BUFFERS *X; BUFFERS *X;
word length; word length;
word i; word i;
...@@ -761,7 +761,7 @@ byte isdn_ind(ADAPTER * a, ...@@ -761,7 +761,7 @@ byte isdn_ind(ADAPTER * a,
word clength; word clength;
word offset; word offset;
BUFFERS *R; BUFFERS *R;
byte* cma = 0; byte* cma = NULL;
#ifdef USE_EXTENDED_DEBUGS #ifdef USE_EXTENDED_DEBUGS
{ {
DBG_TRC(("<A%d Id=0x%x Ind=0x%x", ((ISDN_ADAPTER *)a->io)->ANum, Id, Ind)) DBG_TRC(("<A%d Id=0x%x Ind=0x%x", ((ISDN_ADAPTER *)a->io)->ANum, Id, Ind))
...@@ -814,7 +814,7 @@ byte isdn_ind(ADAPTER * a, ...@@ -814,7 +814,7 @@ byte isdn_ind(ADAPTER * a,
Id, Id,
cma, cma,
sizeof(a->stream_buffer), sizeof(a->stream_buffer),
&final, 0, 0); &final, NULL, NULL);
} }
IoAdapter->RBuffer.length = MIN(MLength, 270); IoAdapter->RBuffer.length = MIN(MLength, 270);
if (IoAdapter->RBuffer.length != MLength) { if (IoAdapter->RBuffer.length != MLength) {
......
...@@ -66,7 +66,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void) ...@@ -66,7 +66,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
req.didd_notify.e.Rc = req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY; IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback; req.didd_notify.info.callback = (void *)didd_callback;
req.didd_notify.info.context = 0; req.didd_notify.info.context = NULL;
_DAdapter.request((ENTITY *) & req); _DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) if (req.didd_notify.e.Rc != 0xff)
return (0); return (0);
......
...@@ -131,7 +131,7 @@ static diva_supported_cards_info_t divas_supported_cards[] = { ...@@ -131,7 +131,7 @@ static diva_supported_cards_info_t divas_supported_cards[] = {
/* /*
EOL EOL
*/ */
{-1, 0} {-1}
}; };
static void diva_init_request_array(void); static void diva_init_request_array(void);
...@@ -174,7 +174,7 @@ void *diva_driver_add_card(void *pdev, unsigned long CardOrdinal) ...@@ -174,7 +174,7 @@ void *diva_driver_add_card(void *pdev, unsigned long CardOrdinal)
for (i = 0; divas_supported_cards[i].CardOrdinal != -1; i++) { for (i = 0; divas_supported_cards[i].CardOrdinal != -1; i++) {
if (divas_supported_cards[i].CardOrdinal == CardOrdinal) { if (divas_supported_cards[i].CardOrdinal == CardOrdinal) {
if (!(pdiva = divas_create_pci_card(i, pdev))) { if (!(pdiva = divas_create_pci_card(i, pdev))) {
return (0); return NULL;
} }
switch (CardOrdinal) { switch (CardOrdinal) {
case CARDTYPE_DIVASRV_Q_8M_PCI: case CARDTYPE_DIVASRV_Q_8M_PCI:
...@@ -237,11 +237,11 @@ void *diva_driver_add_card(void *pdev, unsigned long CardOrdinal) ...@@ -237,11 +237,11 @@ void *diva_driver_add_card(void *pdev, unsigned long CardOrdinal)
DBG_ERR(("can not alloc request array")) DBG_ERR(("can not alloc request array"))
diva_driver_remove_card(pdiva); diva_driver_remove_card(pdiva);
return (0); return NULL;
} }
} }
return (0); return NULL;
} }
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
...@@ -286,7 +286,7 @@ void diva_driver_remove_card(void *pdiva) ...@@ -286,7 +286,7 @@ void diva_driver_remove_card(void *pdiva)
int i; int i;
pa = a[0] = (diva_os_xdi_adapter_t *) pdiva; 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"); diva_os_enter_spin_lock(&adapter_lock, &old_irql, "remode adapter");
...@@ -311,7 +311,7 @@ void diva_driver_remove_card(void *pdiva) ...@@ -311,7 +311,7 @@ void diva_driver_remove_card(void *pdiva)
if (a[i]) { if (a[i]) {
if (a[i]->controller) { if (a[i]->controller) {
DBG_LOG(("remove adapter (%d)", 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]); remove_adapter_proc(a[i]);
} }
diva_os_free(0, a[i]); diva_os_free(0, a[i]);
...@@ -332,7 +332,7 @@ static void *divas_create_pci_card(int handle, void *pci_dev_handle) ...@@ -332,7 +332,7 @@ static void *divas_create_pci_card(int handle, void *pci_dev_handle)
if (!(a = (diva_os_xdi_adapter_t *) diva_os_malloc(0, sizeof(*a)))) { if (!(a = (diva_os_xdi_adapter_t *) diva_os_malloc(0, sizeof(*a)))) {
DBG_ERR(("A: can't alloc adapter")); DBG_ERR(("A: can't alloc adapter"));
return (0); return NULL;
} }
memset(a, 0x00, sizeof(*a)); memset(a, 0x00, sizeof(*a));
...@@ -359,7 +359,7 @@ static void *divas_create_pci_card(int handle, void *pci_dev_handle) ...@@ -359,7 +359,7 @@ static void *divas_create_pci_card(int handle, void *pci_dev_handle)
diva_os_leave_spin_lock(&adapter_lock, &old_irql, "found_pci_card"); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "found_pci_card");
diva_os_free(0, a); diva_os_free(0, a);
DBG_ERR(("A: can't get adapter resources")); DBG_ERR(("A: can't get adapter resources"));
return (0); return NULL;
} }
return (a); return (a);
...@@ -377,7 +377,7 @@ void divasa_xdi_driver_unload(void) ...@@ -377,7 +377,7 @@ void divasa_xdi_driver_unload(void)
(*(a->interface.cleanup_adapter_proc)) (a); (*(a->interface.cleanup_adapter_proc)) (a);
} }
if (a->controller) { if (a->controller) {
IoAdapters[a->controller - 1] = 0; IoAdapters[a->controller - 1] = NULL;
remove_adapter_proc(a); remove_adapter_proc(a);
} }
diva_os_free(0, a); diva_os_free(0, a);
...@@ -400,11 +400,11 @@ void *diva_xdi_open_adapter(void *os_handle, const void *src, ...@@ -400,11 +400,11 @@ void *diva_xdi_open_adapter(void *os_handle, const void *src,
if (length < sizeof(diva_xdi_um_cfg_cmd_t)) { if (length < sizeof(diva_xdi_um_cfg_cmd_t)) {
DBG_ERR(("A: A(?) open, msg too small (%d < %d)", DBG_ERR(("A: A(?) open, msg too small (%d < %d)",
length, sizeof(diva_xdi_um_cfg_cmd_t))) length, sizeof(diva_xdi_um_cfg_cmd_t)))
return (0); return NULL;
} }
if ((*cp_fn) (os_handle, &msg, src, sizeof(msg)) <= 0) { if ((*cp_fn) (os_handle, &msg, src, sizeof(msg)) <= 0) {
DBG_ERR(("A: A(?) open, write error")) DBG_ERR(("A: A(?) open, write error"))
return (0); return NULL;
} }
diva_os_enter_spin_lock(&adapter_lock, &old_irql, "open_adapter"); diva_os_enter_spin_lock(&adapter_lock, &old_irql, "open_adapter");
list_for_each(tmp, &adapter_queue) { list_for_each(tmp, &adapter_queue) {
...@@ -432,7 +432,7 @@ void diva_xdi_close_adapter(void *adapter, void *os_handle) ...@@ -432,7 +432,7 @@ void diva_xdi_close_adapter(void *adapter, void *os_handle)
a->xdi_mbox.status &= ~DIVA_XDI_MBOX_BUSY; a->xdi_mbox.status &= ~DIVA_XDI_MBOX_BUSY;
if (a->xdi_mbox.data) { if (a->xdi_mbox.data) {
diva_os_free(0, a->xdi_mbox.data); diva_os_free(0, a->xdi_mbox.data);
a->xdi_mbox.data = 0; a->xdi_mbox.data = NULL;
} }
} }
...@@ -507,7 +507,7 @@ diva_xdi_read(void *adapter, void *os_handle, void *dst, ...@@ -507,7 +507,7 @@ diva_xdi_read(void *adapter, void *os_handle, void *dst,
a->xdi_mbox.data_length); a->xdi_mbox.data_length);
if (ret > 0) { if (ret > 0) {
diva_os_free(0, 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.status &= ~DIVA_XDI_MBOX_BUSY; a->xdi_mbox.status &= ~DIVA_XDI_MBOX_BUSY;
} }
...@@ -526,7 +526,7 @@ irqreturn_t diva_os_irq_wrapper(int irq, void *context, struct pt_regs *regs) ...@@ -526,7 +526,7 @@ irqreturn_t diva_os_irq_wrapper(int irq, void *context, struct pt_regs *regs)
if ((clear_int_proc = a->clear_interrupts_proc)) { if ((clear_int_proc = a->clear_interrupts_proc)) {
(*clear_int_proc) (a); (*clear_int_proc) (a);
a->clear_interrupts_proc = 0; a->clear_interrupts_proc = NULL;
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
...@@ -39,11 +39,10 @@ struct _diva_dma_map_entry { ...@@ -39,11 +39,10 @@ struct _diva_dma_map_entry {
Create local mapping structure and init it to default state Create local mapping structure and init it to default state
*/ */
struct _diva_dma_map_entry* diva_alloc_dma_map (void* os_context, int nentries) { struct _diva_dma_map_entry* diva_alloc_dma_map (void* os_context, int nentries) {
diva_dma_map_entry_t* pmap; diva_dma_map_entry_t* pmap = diva_os_malloc(0, sizeof(*pmap)*(nentries+1));
if (!(pmap = diva_os_malloc (0, sizeof(*pmap)*(nentries+1)))) if (pmap)
return (0); memset (pmap, 0, sizeof(*pmap)*(nentries+1));
memset (pmap, 0x00, sizeof(*pmap)*(nentries+1)); return pmap;
return (pmap);
} }
/* /*
Free local map (context should be freed before) if any Free local map (context should be freed before) if any
......
...@@ -144,7 +144,7 @@ static struct proc_dir_entry *maint_proc_entry = NULL; ...@@ -144,7 +144,7 @@ static struct proc_dir_entry *maint_proc_entry = NULL;
static ssize_t static ssize_t
maint_read(struct file *file, char *buf, size_t count, loff_t * off) 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; diva_os_spin_lock_magic_t old_irql;
word size; word size;
char *pstr, *dli_label = "UNK"; char *pstr, *dli_label = "UNK";
...@@ -264,13 +264,13 @@ maint_read(struct file *file, char *buf, size_t count, loff_t * off) ...@@ -264,13 +264,13 @@ maint_read(struct file *file, char *buf, size_t count, loff_t * off)
if (diva_os_copy_to_user(NULL, buf, pstr, str_length)) { if (diva_os_copy_to_user(NULL, buf, pstr, str_length)) {
diva_os_free_tbuffer(0, str_msg); diva_os_free_tbuffer(0, str_msg);
file->private_data = 0; file->private_data = NULL;
return (-EFAULT); return (-EFAULT);
} }
str_msg[1] += str_length; str_msg[1] += str_length;
if ((str_msg[0] - str_msg[1]) <= 0) { if ((str_msg[0] - str_msg[1]) <= 0) {
diva_os_free_tbuffer(0, str_msg); diva_os_free_tbuffer(0, str_msg);
file->private_data = 0; file->private_data = NULL;
} }
return (str_length); return (str_length);
...@@ -304,7 +304,7 @@ static int maint_open(struct inode *ino, struct file *filep) ...@@ -304,7 +304,7 @@ static int maint_open(struct inode *ino, struct file *filep)
opened++; opened++;
up(&opened_sem); up(&opened_sem);
filep->private_data = 0; filep->private_data = NULL;
return (0); return (0);
} }
...@@ -313,7 +313,7 @@ static int maint_close(struct inode *ino, struct file *filep) ...@@ -313,7 +313,7 @@ static int maint_close(struct inode *ino, struct file *filep)
{ {
if (filep->private_data) { if (filep->private_data) {
diva_os_free_tbuffer(0, filep->private_data); diva_os_free_tbuffer(0, filep->private_data);
filep->private_data = 0; filep->private_data = NULL;
} }
down(&opened_sem); down(&opened_sem);
...@@ -416,7 +416,7 @@ static int DIVA_INIT_FUNCTION maint_init(void) ...@@ -416,7 +416,7 @@ static int DIVA_INIT_FUNCTION maint_init(void)
{ {
char tmprev[50]; char tmprev[50];
int ret = 0; int ret = 0;
void *buffer = 0; void *buffer = NULL;
do_gettimeofday(&start_time); do_gettimeofday(&start_time);
init_waitqueue_head(&msgwaitq); init_waitqueue_head(&msgwaitq);
......
...@@ -173,7 +173,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void) ...@@ -173,7 +173,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
req.didd_notify.e.Rc = req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY; IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback; req.didd_notify.info.callback = (void *)didd_callback;
req.didd_notify.info.context = 0; req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req); DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) { if (req.didd_notify.e.Rc != 0xff) {
stop_dbg(); stop_dbg();
......
...@@ -556,7 +556,7 @@ void diva_os_remove_soft_isr(diva_os_soft_isr_t * psoft_isr) ...@@ -556,7 +556,7 @@ void diva_os_remove_soft_isr(diva_os_soft_isr_t * psoft_isr)
tasklet_kill(&pdpc->divas_task); tasklet_kill(&pdpc->divas_task);
flush_scheduled_work(); flush_scheduled_work();
mem = psoft_isr->object; mem = psoft_isr->object;
psoft_isr->object = 0; psoft_isr->object = NULL;
diva_os_free(0, mem); diva_os_free(0, mem);
} }
} }
...@@ -703,7 +703,7 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void) ...@@ -703,7 +703,7 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void)
static int __devinit divas_init_one(struct pci_dev *pdev, static int __devinit divas_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
void *pdiva = 0; void *pdiva = NULL;
u8 pci_latency; u8 pci_latency;
u8 new_latency = 32; u8 new_latency = 32;
......
...@@ -23,7 +23,7 @@ diva_data_q_init(diva_um_idi_data_queue_t * q, ...@@ -23,7 +23,7 @@ diva_data_q_init(diva_um_idi_data_queue_t * q,
q->segments = max_segments; q->segments = max_segments;
for (i = 0; i < q->segments; i++) { for (i = 0; i < q->segments; i++) {
q->data[i] = 0; q->data[i] = NULL;
q->length[i] = 0; q->length[i] = 0;
} }
q->read = q->write = q->count = q->segment_pending = 0; q->read = q->write = q->count = q->segment_pending = 0;
...@@ -46,7 +46,7 @@ int diva_data_q_finit(diva_um_idi_data_queue_t * q) ...@@ -46,7 +46,7 @@ int diva_data_q_finit(diva_um_idi_data_queue_t * q)
if (q->data[i]) { if (q->data[i]) {
diva_os_free(0, q->data[i]); diva_os_free(0, q->data[i]);
} }
q->data[i] = 0; q->data[i] = NULL;
q->length[i] = 0; q->length[i] = 0;
} }
q->read = q->write = q->count = q->segment_pending = 0; q->read = q->write = q->count = q->segment_pending = 0;
...@@ -66,7 +66,7 @@ void *diva_data_q_get_segment4write(diva_um_idi_data_queue_t * q) ...@@ -66,7 +66,7 @@ void *diva_data_q_get_segment4write(diva_um_idi_data_queue_t * q)
return (q->data[q->write]); return (q->data[q->write]);
} }
return (0); return NULL;
} }
void void
...@@ -89,7 +89,7 @@ const void *diva_data_q_get_segment4read(const diva_um_idi_data_queue_t * ...@@ -89,7 +89,7 @@ const void *diva_data_q_get_segment4read(const diva_um_idi_data_queue_t *
if (q->count) { if (q->count) {
return (q->data[q->read]); return (q->data[q->read]);
} }
return (0); return NULL;
} }
int diva_data_q_get_segment_length(const diva_um_idi_data_queue_t * q) int diva_data_q_get_segment_length(const diva_um_idi_data_queue_t * q)
......
...@@ -199,7 +199,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void) ...@@ -199,7 +199,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
req.didd_notify.e.Rc = req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY; IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback; req.didd_notify.info.callback = (void *)didd_callback;
req.didd_notify.info.context = 0; req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req); DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) { if (req.didd_notify.e.Rc != 0xff) {
stop_dbg(); stop_dbg();
......
...@@ -112,7 +112,7 @@ diva_strace_library_interface_t* DivaSTraceLibraryCreateInstance (int Adapter, ...@@ -112,7 +112,7 @@ diva_strace_library_interface_t* DivaSTraceLibraryCreateInstance (int Adapter,
int i; int i;
if (!pLib) { if (!pLib) {
return (0); return NULL;
} }
pmem += sizeof(*pLib); pmem += sizeof(*pLib);
...@@ -161,7 +161,7 @@ diva_strace_library_interface_t* DivaSTraceLibraryCreateInstance (int Adapter, ...@@ -161,7 +161,7 @@ diva_strace_library_interface_t* DivaSTraceLibraryCreateInstance (int Adapter,
if (!(pLib->hAdapter = SuperTraceOpenAdapter (Adapter))) { if (!(pLib->hAdapter = SuperTraceOpenAdapter (Adapter))) {
diva_mnt_internal_dprintf (0, DLI_ERR, "Can not open XDI adapter"); diva_mnt_internal_dprintf (0, DLI_ERR, "Can not open XDI adapter");
return (0); return NULL;
} }
pLib->Channels = SuperTraceGetNumberOfChannels (pLib->hAdapter); pLib->Channels = SuperTraceGetNumberOfChannels (pLib->hAdapter);
...@@ -1170,13 +1170,13 @@ static diva_man_var_header_t* get_next_var (diva_man_var_header_t* pVar) { ...@@ -1170,13 +1170,13 @@ static diva_man_var_header_t* get_next_var (diva_man_var_header_t* pVar) {
byte* start; byte* start;
int msg_length; int msg_length;
if (*msg != ESC) return (0); if (*msg != ESC) return NULL;
start = msg + 2; start = msg + 2;
msg_length = *(msg+1); msg_length = *(msg+1);
msg = (start+msg_length); msg = (start+msg_length);
if (*msg != ESC) return (0); if (*msg != ESC) return NULL;
return ((diva_man_var_header_t*)msg); return ((diva_man_var_header_t*)msg);
} }
......
This diff is collapsed.
...@@ -102,7 +102,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void) ...@@ -102,7 +102,7 @@ static int DIVA_INIT_FUNCTION connect_didd(void)
req.didd_notify.e.Rc = req.didd_notify.e.Rc =
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY; IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback; req.didd_notify.info.callback = (void *)didd_callback;
req.didd_notify.info.context = 0; req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req); DAdapter.request((ENTITY *) & req);
if (req.didd_notify.e.Rc != 0xff) if (req.didd_notify.e.Rc != 0xff)
return (0); return (0);
...@@ -228,7 +228,7 @@ int maint_read_write(void *buf, int count) ...@@ -228,7 +228,7 @@ int maint_read_write(void *buf, int count)
diva_os_spin_lock_magic_t old_irql; diva_os_spin_lock_magic_t old_irql;
word size; word size;
diva_dbg_entry_head_t *pmsg; diva_dbg_entry_head_t *pmsg;
byte *pbuf = 0; byte *pbuf = NULL;
int written = 0; int written = 0;
if (mask < 4096) { if (mask < 4096) {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "mi_pc.h" #include "mi_pc.h"
#include "dsrv4bri.h" #include "dsrv4bri.h"
void *diva_xdiLoadFileFile = 0; void *diva_xdiLoadFileFile = NULL;
dword diva_xdiLoadFileLength = 0; dword diva_xdiLoadFileLength = 0;
/* /*
...@@ -268,7 +268,7 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a) ...@@ -268,7 +268,7 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a)
(diva_os_xdi_adapter_t *) diva_os_malloc(0, sizeof(*a)))) (diva_os_xdi_adapter_t *) diva_os_malloc(0, sizeof(*a))))
{ {
diva_os_free(0, a->slave_adapters[0]); diva_os_free(0, a->slave_adapters[0]);
a->slave_adapters[0] = 0; a->slave_adapters[0] = NULL;
diva_4bri_cleanup_adapter(a); diva_4bri_cleanup_adapter(a);
return (-1); return (-1);
} }
...@@ -277,8 +277,8 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a) ...@@ -277,8 +277,8 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a)
{ {
diva_os_free(0, a->slave_adapters[0]); diva_os_free(0, a->slave_adapters[0]);
diva_os_free(0, a->slave_adapters[1]); diva_os_free(0, a->slave_adapters[1]);
a->slave_adapters[0] = 0; a->slave_adapters[0] = NULL;
a->slave_adapters[1] = 0; a->slave_adapters[1] = NULL;
diva_4bri_cleanup_adapter(a); diva_4bri_cleanup_adapter(a);
return (-1); return (-1);
} }
...@@ -300,7 +300,7 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a) ...@@ -300,7 +300,7 @@ int diva_4bri_init_card(diva_os_xdi_adapter_t * a)
if (!(a->slave_list = quadro_list)) { if (!(a->slave_list = quadro_list)) {
for (i = 0; i < (tasks - 1); i++) { for (i = 0; i < (tasks - 1); i++) {
diva_os_free(0, a->slave_adapters[i]); diva_os_free(0, a->slave_adapters[i]);
a->slave_adapters[i] = 0; a->slave_adapters[i] = NULL;
} }
diva_4bri_cleanup_adapter(a); diva_4bri_cleanup_adapter(a);
return (-1); return (-1);
...@@ -499,7 +499,7 @@ static int diva_4bri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -499,7 +499,7 @@ static int diva_4bri_cleanup_adapter(diva_os_xdi_adapter_t * a)
&& a->resources.pci.addr[bar]) { && a->resources.pci.addr[bar]) {
divasa_unmap_pci_bar(a->resources.pci.addr[bar]); divasa_unmap_pci_bar(a->resources.pci.addr[bar]);
a->resources.pci.bar[bar] = 0; a->resources.pci.bar[bar] = 0;
a->resources.pci.addr[bar] = 0; a->resources.pci.addr[bar] = NULL;
} }
} }
} }
...@@ -515,12 +515,12 @@ static int diva_4bri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -515,12 +515,12 @@ static int diva_4bri_cleanup_adapter(diva_os_xdi_adapter_t * a)
_4bri_bar_length[1], _4bri_bar_length[1],
&a->port_name[0], 1); &a->port_name[0], 1);
a->resources.pci.bar[1] = 0; a->resources.pci.bar[1] = 0;
a->resources.pci.addr[1] = 0; a->resources.pci.addr[1] = NULL;
} }
if (a->slave_list) { if (a->slave_list) {
diva_os_free(0, a->slave_list); diva_os_free(0, a->slave_list);
a->slave_list = 0; a->slave_list = NULL;
} }
return (0); return (0);
...@@ -607,14 +607,14 @@ static int diva_4bri_cleanup_slave_adapters(diva_os_xdi_adapter_t * a) ...@@ -607,14 +607,14 @@ static int diva_4bri_cleanup_slave_adapters(diva_os_xdi_adapter_t * a)
diva_os_remove_soft_isr(&diva_current->xdi_adapter. diva_os_remove_soft_isr(&diva_current->xdi_adapter.
req_soft_isr); 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) { if (diva_current->xdi_adapter.e_tbl) {
diva_os_free(0, diva_os_free(0,
diva_current->xdi_adapter. diva_current->xdi_adapter.
e_tbl); 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_max = 0;
diva_current->xdi_adapter.e_count = 0; diva_current->xdi_adapter.e_count = 0;
} }
...@@ -823,7 +823,7 @@ void *xdiLoadFile(char *FileName, unsigned long *FileLength, ...@@ -823,7 +823,7 @@ void *xdiLoadFile(char *FileName, unsigned long *FileLength,
if (FileLength) { if (FileLength) {
*FileLength = diva_xdiLoadFileLength; *FileLength = diva_xdiLoadFileLength;
} }
diva_xdiLoadFileFile = 0; diva_xdiLoadFileFile = NULL;
diva_xdiLoadFileLength = 0; diva_xdiLoadFileLength = 0;
return (ret); return (ret);
...@@ -848,7 +848,7 @@ diva_4bri_write_fpga_image(diva_os_xdi_adapter_t * a, byte * data, ...@@ -848,7 +848,7 @@ diva_4bri_write_fpga_image(diva_os_xdi_adapter_t * a, byte * data,
ret = qBri_FPGA_download(&a->xdi_adapter); ret = qBri_FPGA_download(&a->xdi_adapter);
diva_xdiLoadFileFile = 0; diva_xdiLoadFileFile = NULL;
diva_xdiLoadFileLength = 0; diva_xdiLoadFileLength = 0;
return (ret ? 0 : -1); return (ret ? 0 : -1);
...@@ -1116,7 +1116,7 @@ static int diva_4bri_stop_adapter(diva_os_xdi_adapter_t * a) ...@@ -1116,7 +1116,7 @@ static int diva_4bri_stop_adapter(diva_os_xdi_adapter_t * a)
if (a->clear_interrupts_proc) { if (a->clear_interrupts_proc) {
diva_4bri_clear_interrupts(a); 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", DBG_ERR(("A: A(%d) no final interrupt from 4BRI adapter",
IoAdapter->ANum)) IoAdapter->ANum))
} }
......
...@@ -282,7 +282,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -282,7 +282,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a)
if (a->resources.pci.addr[0] && a->resources.pci.bar[0]) { if (a->resources.pci.addr[0] && a->resources.pci.bar[0]) {
divasa_unmap_pci_bar(a->resources.pci.addr[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.bar[0] = 0;
} }
...@@ -293,7 +293,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -293,7 +293,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a)
a->resources.pci. a->resources.pci.
length[i], length[i],
&a->port_name[0], i); &a->port_name[0], i);
a->resources.pci.addr[i] = 0; a->resources.pci.addr[i] = NULL;
a->resources.pci.bar[i] = 0; a->resources.pci.bar[i] = 0;
} }
} }
...@@ -305,7 +305,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -305,7 +305,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a)
diva_os_cancel_soft_isr(&a->xdi_adapter.isr_soft_isr); diva_os_cancel_soft_isr(&a->xdi_adapter.isr_soft_isr);
diva_os_remove_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.isr_spin_lock, "rm");
diva_os_destroy_spin_lock(&a->xdi_adapter.data_spin_lock, "rm"); diva_os_destroy_spin_lock(&a->xdi_adapter.data_spin_lock, "rm");
...@@ -315,7 +315,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -315,7 +315,7 @@ static int diva_bri_cleanup_adapter(diva_os_xdi_adapter_t * a)
*/ */
if (a->xdi_adapter.e_tbl) { if (a->xdi_adapter.e_tbl) {
diva_os_free(0, 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); return (0);
...@@ -367,7 +367,7 @@ static int diva_bri_reregister_io(diva_os_xdi_adapter_t * a) ...@@ -367,7 +367,7 @@ static int diva_bri_reregister_io(diva_os_xdi_adapter_t * a)
diva_os_register_io_port(a, 0, a->resources.pci.bar[i], diva_os_register_io_port(a, 0, a->resources.pci.bar[i],
a->resources.pci.length[i], a->resources.pci.length[i],
&a->port_name[0], 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", sprintf(a->port_name, "DIVA BRI %ld",
...@@ -797,7 +797,7 @@ static int diva_bri_stop_adapter(diva_os_xdi_adapter_t * a) ...@@ -797,7 +797,7 @@ static int diva_bri_stop_adapter(diva_os_xdi_adapter_t * a)
} while (i-- && a->clear_interrupts_proc); } while (i-- && a->clear_interrupts_proc);
if (a->clear_interrupts_proc) { if (a->clear_interrupts_proc) {
diva_bri_clear_interrupts(a); 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", DBG_ERR(("A: A(%d) no final interrupt from BRI adapter",
IoAdapter->ANum)) IoAdapter->ANum))
} }
......
...@@ -283,7 +283,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -283,7 +283,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a)
&& a->resources.pci.addr[bar]) { && a->resources.pci.addr[bar]) {
divasa_unmap_pci_bar(a->resources.pci.addr[bar]); divasa_unmap_pci_bar(a->resources.pci.addr[bar]);
a->resources.pci.bar[bar] = 0; a->resources.pci.bar[bar] = 0;
a->resources.pci.addr[bar] = 0; a->resources.pci.addr[bar] = NULL;
} }
} }
...@@ -294,7 +294,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -294,7 +294,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a)
diva_os_cancel_soft_isr(&a->xdi_adapter.req_soft_isr); diva_os_cancel_soft_isr(&a->xdi_adapter.req_soft_isr);
diva_os_remove_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.isr_spin_lock, "rm");
diva_os_destroy_spin_lock(&a->xdi_adapter.data_spin_lock, "rm"); diva_os_destroy_spin_lock(&a->xdi_adapter.data_spin_lock, "rm");
...@@ -304,7 +304,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -304,7 +304,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a)
*/ */
if (a->xdi_adapter.e_tbl) { if (a->xdi_adapter.e_tbl) {
diva_os_free(0, 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.Channels = 0;
a->xdi_adapter.e_max = 0; a->xdi_adapter.e_max = 0;
...@@ -316,7 +316,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a) ...@@ -316,7 +316,7 @@ static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t * a)
diva_free_dma_map(a->resources.pci.hdev, diva_free_dma_map(a->resources.pci.hdev,
(struct _diva_dma_map_entry *) a->xdi_adapter. (struct _diva_dma_map_entry *) a->xdi_adapter.
dma_map); dma_map);
a->xdi_adapter.dma_map = 0; a->xdi_adapter.dma_map = NULL;
/* /*
...@@ -576,7 +576,7 @@ static int diva_pri_stop_adapter(diva_os_xdi_adapter_t * a) ...@@ -576,7 +576,7 @@ static int diva_pri_stop_adapter(diva_os_xdi_adapter_t * a)
if (a->clear_interrupts_proc) { if (a->clear_interrupts_proc) {
diva_pri_clear_interrupts(a); 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", DBG_ERR(("A: A(%d) no final interrupt from PRI adapter",
IoAdapter->ANum)) IoAdapter->ANum))
} }
......
...@@ -188,9 +188,9 @@ static void cleanup_adapter(diva_um_idi_adapter_t * a) ...@@ -188,9 +188,9 @@ static void cleanup_adapter(diva_um_idi_adapter_t * a)
------------------------------------------------------------------------ */ ------------------------------------------------------------------------ */
static void cleanup_entity(divas_um_idi_entity_t * e) static void cleanup_entity(divas_um_idi_entity_t * e)
{ {
e->os_ref = 0; e->os_ref = NULL;
e->status = 0; e->status = 0;
e->adapter = 0; e->adapter = NULL;
e->e.Id = 0; e->e.Id = 0;
e->rc_count = 0; e->rc_count = 0;
...@@ -218,20 +218,20 @@ void *divas_um_idi_create_entity(dword adapter_nr, void *file) ...@@ -218,20 +218,20 @@ void *divas_um_idi_create_entity(dword adapter_nr, void *file)
diva_os_malloc(0, diva_os_get_context_size()))) { diva_os_malloc(0, diva_os_get_context_size()))) {
DBG_LOG(("E(%08x) no memory for os context", e)); DBG_LOG(("E(%08x) no memory for os context", e));
diva_os_free(0, e); diva_os_free(0, e);
return (0); return NULL;
} }
memset(e->os_context, 0x00, diva_os_get_context_size()); memset(e->os_context, 0x00, diva_os_get_context_size());
if ((diva_data_q_init(&e->data, 2048 + 512, 16))) { if ((diva_data_q_init(&e->data, 2048 + 512, 16))) {
diva_os_free(0, e->os_context); diva_os_free(0, e->os_context);
diva_os_free(0, e); diva_os_free(0, e);
return (0); return NULL;
} }
if ((diva_data_q_init(&e->rc, sizeof(diva_um_idi_ind_hdr_t), 2))) { if ((diva_data_q_init(&e->rc, sizeof(diva_um_idi_ind_hdr_t), 2))) {
diva_data_q_finit(&e->data); diva_data_q_finit(&e->data);
diva_os_free(0, e->os_context); diva_os_free(0, e->os_context);
diva_os_free(0, e); diva_os_free(0, e);
return (0); return NULL;
} }
diva_os_enter_spin_lock(&adapter_lock, &old_irql, "create_entity"); diva_os_enter_spin_lock(&adapter_lock, &old_irql, "create_entity");
...@@ -250,7 +250,7 @@ void *divas_um_idi_create_entity(dword adapter_nr, void *file) ...@@ -250,7 +250,7 @@ void *divas_um_idi_create_entity(dword adapter_nr, void *file)
diva_os_free(0, e->os_context); diva_os_free(0, e->os_context);
diva_os_free(0, e); diva_os_free(0, e);
return (0); return NULL;
} }
e->os_ref = file; /* link to os handle */ e->os_ref = file; /* link to os handle */
...@@ -608,9 +608,9 @@ static int process_idi_request(divas_um_idi_entity_t * e, ...@@ -608,9 +608,9 @@ static int process_idi_request(divas_um_idi_entity_t * e,
e->e.IndCh = 0; e->e.IndCh = 0;
e->e.XNum = 0; e->e.XNum = 0;
e->e.RNum = 0; e->e.RNum = 0;
e->e.callback = 0; e->e.callback = NULL;
e->e.X = 0; e->e.X = NULL;
e->e.R = 0; e->e.R = NULL;
write_return_code(e, ASSIGN_RC | OUT_OF_RESOURCES); write_return_code(e, ASSIGN_RC | OUT_OF_RESOURCES);
return (-2); return (-2);
} else { } else {
...@@ -631,7 +631,7 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc) ...@@ -631,7 +631,7 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc)
if (rc != ASSIGN_OK) { if (rc != ASSIGN_OK) {
DBG_ERR(("A: A(%d) E(%08x) ASSIGN failed", DBG_ERR(("A: A(%d) E(%08x) ASSIGN failed",
e->adapter->adapter_nr, e)); e->adapter->adapter_nr, e));
e->e.callback = 0; e->e.callback = NULL;
e->e.Id = 0; e->e.Id = 0;
e->e.Req = 0; e->e.Req = 0;
e->e.ReqCh = 0; e->e.ReqCh = 0;
...@@ -639,8 +639,8 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc) ...@@ -639,8 +639,8 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc)
e->e.RcCh = 0; e->e.RcCh = 0;
e->e.Ind = 0; e->e.Ind = 0;
e->e.IndCh = 0; e->e.IndCh = 0;
e->e.X = 0; e->e.X = NULL;
e->e.R = 0; e->e.R = NULL;
e->e.XNum = 0; e->e.XNum = 0;
e->e.RNum = 0; e->e.RNum = 0;
} }
...@@ -651,7 +651,7 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc) ...@@ -651,7 +651,7 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc)
return (0); /* let us do it in the driver */ return (0); /* let us do it in the driver */
} }
if ((e->e.Req == REMOVE) && (!e->e.Id)) { /* REMOVE COMPLETE */ if ((e->e.Req == REMOVE) && (!e->e.Id)) { /* REMOVE COMPLETE */
e->e.callback = 0; e->e.callback = NULL;
e->e.Id = 0; e->e.Id = 0;
e->e.Req = 0; e->e.Req = 0;
e->e.ReqCh = 0; e->e.ReqCh = 0;
...@@ -659,8 +659,8 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc) ...@@ -659,8 +659,8 @@ static int process_idi_rc(divas_um_idi_entity_t * e, byte rc)
e->e.RcCh = 0; e->e.RcCh = 0;
e->e.Ind = 0; e->e.Ind = 0;
e->e.IndCh = 0; e->e.IndCh = 0;
e->e.X = 0; e->e.X = NULL;
e->e.R = 0; e->e.R = NULL;
e->e.XNum = 0; e->e.XNum = 0;
e->e.RNum = 0; e->e.RNum = 0;
e->rc_count = 0; e->rc_count = 0;
......
...@@ -1586,7 +1586,7 @@ int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[], ...@@ -1586,7 +1586,7 @@ int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[],
cards[i].protocol = protocol; cards[i].protocol = protocol;
sprintf(id, "%s%d", name, i); sprintf(id, "%s%d", name, i);
nrcards++; nrcards++;
retval = checkcard(i, id, 0, hisax_d_if->owner); retval = checkcard(i, id, NULL, hisax_d_if->owner);
if (retval == 0) { // yuck if (retval == 0) { // yuck
cards[i].typ = 0; cards[i].typ = 0;
nrcards--; nrcards--;
......
...@@ -1158,7 +1158,7 @@ setup_diva(struct IsdnCard *card) ...@@ -1158,7 +1158,7 @@ setup_diva(struct IsdnCard *card)
cs->writeisacfifo = &MemWriteISACfifo_IPACX; cs->writeisacfifo = &MemWriteISACfifo_IPACX;
cs->BC_Read_Reg = &MemReadHSCX_IPACX; cs->BC_Read_Reg = &MemReadHSCX_IPACX;
cs->BC_Write_Reg = &MemWriteHSCX_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; cs->irq_func = &diva_irq_ipacx_pci;
printk(KERN_INFO "Diva: IPACX Design Id: %x\n", printk(KERN_INFO "Diva: IPACX Design Id: %x\n",
MemReadISAC_IPACX(cs, IPACX_ID) &0x3F); MemReadISAC_IPACX(cs, IPACX_ID) &0x3F);
......
...@@ -401,7 +401,7 @@ static void rs_interrupt_elsa(int irq, struct IsdnCardState *cs) ...@@ -401,7 +401,7 @@ static void rs_interrupt_elsa(int irq, struct IsdnCardState *cs)
if (status & UART_LSR_DR) if (status & UART_LSR_DR)
receive_chars(cs, &status); receive_chars(cs, &status);
if (status & UART_LSR_THRE) if (status & UART_LSR_THRE)
transmit_chars(cs, 0); transmit_chars(cs, NULL);
if (pass_counter++ > RS_ISR_PASS_LIMIT) { if (pass_counter++ > RS_ISR_PASS_LIMIT) {
printk("rs_single loop break.\n"); printk("rs_single loop break.\n");
break; break;
......
...@@ -133,7 +133,7 @@ static const char *hfcusb_revision = "4.0"; ...@@ -133,7 +133,7 @@ static const char *hfcusb_revision = "4.0";
/**********/ /**********/
/* macros */ /* 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) #define read_usb(a,b,c) usb_control_msg((a)->dev,(a)->ctrl_in_pipe,1,0xC0,0,(b),(c),1,HFC_CTRL_TIMEOUT)
/*************************************************/ /*************************************************/
...@@ -353,7 +353,7 @@ vendor_data vdata[]= ...@@ -353,7 +353,7 @@ vendor_data vdata[]=
{0x8e3, 0x0301, "Olitec USB RNIS", LED_SCHEME1, LED_NORMAL, {2,0,1,4}}, /* Olitec TA */ {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 */ {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 */ {0x7fa, 0x0846, "Bewan Modem RNIS USB", LED_SCHEME1, LED_INVERTED, {8,0x40,0x20,0x10}}, /* Bewan TA */
{0,0,0} // EOL element {0} // EOL element
}; };
/***************************************************/ /***************************************************/
......
...@@ -239,7 +239,7 @@ tei_id_remove(struct FsmInst *fi, int event, void *arg) ...@@ -239,7 +239,7 @@ tei_id_remove(struct FsmInst *fi, int event, void *arg)
if ((st->l2.tei != -1) && ((tei == GROUP_TEI) || (tei == st->l2.tei))) { if ((st->l2.tei != -1) && ((tei == GROUP_TEI) || (tei == st->l2.tei))) {
FsmDelTimer(&st->ma.t202, 5); FsmDelTimer(&st->ma.t202, 5);
FsmChangeState(&st->ma.tei_m, ST_TEI_NOP); 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 = (struct IsdnCardState *) st->l1.hardware;
cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL); cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL);
} }
...@@ -275,7 +275,7 @@ tei_id_req_tout(struct FsmInst *fi, int event, void *arg) ...@@ -275,7 +275,7 @@ tei_id_req_tout(struct FsmInst *fi, int event, void *arg)
FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 3); FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 3);
} else { } else {
st->ma.tei_m.printdebug(&st->ma.tei_m, "assign req failed"); 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 = (struct IsdnCardState *) st->l1.hardware;
cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL); cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL);
FsmChangeState(fi, ST_TEI_NOP); FsmChangeState(fi, ST_TEI_NOP);
...@@ -298,7 +298,7 @@ tei_id_ver_tout(struct FsmInst *fi, int event, void *arg) ...@@ -298,7 +298,7 @@ tei_id_ver_tout(struct FsmInst *fi, int event, void *arg)
} else { } else {
st->ma.tei_m.printdebug(&st->ma.tei_m, st->ma.tei_m.printdebug(&st->ma.tei_m,
"verify req for tei %d failed", st->l2.tei); "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 = (struct IsdnCardState *) st->l1.hardware;
cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL); cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL);
FsmChangeState(fi, ST_TEI_NOP); FsmChangeState(fi, ST_TEI_NOP);
......
...@@ -959,7 +959,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off) ...@@ -959,7 +959,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
interruptible_sleep_on(&(dev->info_waitq)); interruptible_sleep_on(&(dev->info_waitq));
} }
p = isdn_statstr(); p = isdn_statstr();
file->private_data = 0; file->private_data = NULL;
if ((len = strlen(p)) <= count) { if ((len = strlen(p)) <= count) {
if (copy_to_user(buf, p, len)) { if (copy_to_user(buf, p, len)) {
retval = -EFAULT; retval = -EFAULT;
...@@ -992,7 +992,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off) ...@@ -992,7 +992,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off)
retval = -ENOMEM; retval = -ENOMEM;
goto out; goto out;
} }
len = isdn_readbchan(drvidx, chidx, p, 0, count, len = isdn_readbchan(drvidx, chidx, p, NULL, count,
&dev->drv[drvidx]->rcv_waitq[chidx]); &dev->drv[drvidx]->rcv_waitq[chidx]);
*off += len; *off += len;
if (copy_to_user(buf,p,len)) if (copy_to_user(buf,p,len))
......
...@@ -396,8 +396,8 @@ isdn_net_stat_callback(int idx, isdn_ctrl *c) ...@@ -396,8 +396,8 @@ isdn_net_stat_callback(int idx, isdn_ctrl *c)
if (p) { if (p) {
isdn_net_local *lp = p->local; isdn_net_local *lp = p->local;
#ifdef CONFIG_ISDN_X25 #ifdef CONFIG_ISDN_X25
struct concap_proto *cprot = lp -> netdev -> cprot; struct concap_proto *cprot = lp->netdev->cprot;
struct concap_proto_ops *pops = cprot ? cprot -> pops : 0; struct concap_proto_ops *pops = cprot ? cprot->pops : NULL;
#endif #endif
switch (cmd) { switch (cmd) {
case ISDN_STAT_BSENT: case ISDN_STAT_BSENT:
...@@ -617,7 +617,7 @@ isdn_net_dial(void) ...@@ -617,7 +617,7 @@ isdn_net_dial(void)
s = "dial suppressed: isdn system stopped"; s = "dial suppressed: isdn system stopped";
else else
s = "dial suppressed: dialmode `off'"; s = "dial suppressed: dialmode `off'";
isdn_net_unreachable(&p->dev, 0, s); isdn_net_unreachable(&p->dev, NULL, s);
isdn_net_hangup(&p->dev); isdn_net_hangup(&p->dev);
break; break;
} }
...@@ -645,7 +645,7 @@ isdn_net_dial(void) ...@@ -645,7 +645,7 @@ isdn_net_dial(void)
if (time_after(jiffies, lp->dialstarted + lp->dialtimeout)) { if (time_after(jiffies, lp->dialstarted + lp->dialtimeout)) {
lp->dialwait_timer = jiffies + lp->dialwait; lp->dialwait_timer = jiffies + lp->dialwait;
lp->dialstarted = 0; 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); isdn_net_hangup(&p->dev);
break; break;
} }
...@@ -675,7 +675,7 @@ isdn_net_dial(void) ...@@ -675,7 +675,7 @@ isdn_net_dial(void)
if (lp->dialtimeout == 0) { if (lp->dialtimeout == 0) {
lp->dialwait_timer = jiffies + lp->dialwait; lp->dialwait_timer = jiffies + lp->dialwait;
lp->dialstarted = 0; 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); isdn_net_hangup(&p->dev);
break; break;
...@@ -827,8 +827,8 @@ isdn_net_hangup(struct net_device *d) ...@@ -827,8 +827,8 @@ isdn_net_hangup(struct net_device *d)
isdn_net_local *lp = (isdn_net_local *) d->priv; isdn_net_local *lp = (isdn_net_local *) d->priv;
isdn_ctrl cmd; isdn_ctrl cmd;
#ifdef CONFIG_ISDN_X25 #ifdef CONFIG_ISDN_X25
struct concap_proto *cprot = lp -> netdev -> cprot; struct concap_proto *cprot = lp->netdev->cprot;
struct concap_proto_ops *pops = cprot ? cprot -> pops : 0; struct concap_proto_ops *pops = cprot ? cprot->pops : NULL;
#endif #endif
if (lp->flags & ISDN_NET_CONNECTED) { if (lp->flags & ISDN_NET_CONNECTED) {
...@@ -1416,11 +1416,10 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len) ...@@ -1416,11 +1416,10 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len)
struct sk_buff *skb; struct sk_buff *skb;
skb = alloc_skb(hl + len, GFP_ATOMIC); skb = alloc_skb(hl + len, GFP_ATOMIC);
if (!skb) { if (skb)
printk("isdn out of mem at %s:%d!\n", __FILE__, __LINE__);
return 0;
}
skb_reserve(skb, hl); skb_reserve(skb, hl);
else
printk("isdn out of mem at %s:%d!\n", __FILE__, __LINE__);
return skb; return skb;
} }
...@@ -2182,7 +2181,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) ...@@ -2182,7 +2181,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
*my_eaz == 'b' || *my_eaz == 'B') *my_eaz == 'b' || *my_eaz == 'B')
my_eaz++; /* skip to allow a match */ my_eaz++; /* skip to allow a match */
else else
my_eaz = 0; /* force non match */ my_eaz = NULL; /* force non match */
} else { /* it's a DATA call, check if we allow it */ } else { /* it's a DATA call, check if we allow it */
if (*my_eaz == 'b' || *my_eaz == 'B') if (*my_eaz == 'b' || *my_eaz == 'B')
my_eaz++; /* skip to allow a match */ my_eaz++; /* skip to allow a match */
......
...@@ -134,7 +134,7 @@ isdn_tty_readmodem(void) ...@@ -134,7 +134,7 @@ isdn_tty_readmodem(void)
if (c > 0) { if (c > 0) {
r = isdn_readbchan(info->isdn_driver, info->isdn_channel, r = isdn_readbchan(info->isdn_driver, info->isdn_channel,
tty->flip.char_buf_ptr, tty->flip.char_buf_ptr,
tty->flip.flag_buf_ptr, c, 0); tty->flip.flag_buf_ptr, c, NULL);
/* CISCO AsyncPPP Hack */ /* CISCO AsyncPPP Hack */
if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP)) if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP))
memset(tty->flip.flag_buf_ptr, 0, r); memset(tty->flip.flag_buf_ptr, 0, r);
...@@ -1751,7 +1751,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -1751,7 +1751,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
tty->driver->flush_buffer(tty); tty->driver->flush_buffer(tty);
if (tty->ldisc.flush_buffer) if (tty->ldisc.flush_buffer)
tty->ldisc.flush_buffer(tty); tty->ldisc.flush_buffer(tty);
info->tty = 0; info->tty = NULL;
info->ncarrier = 0; info->ncarrier = 0;
tty->closing = 0; tty->closing = 0;
module_put(info->owner); module_put(info->owner);
...@@ -1780,7 +1780,7 @@ isdn_tty_hangup(struct tty_struct *tty) ...@@ -1780,7 +1780,7 @@ isdn_tty_hangup(struct tty_struct *tty)
isdn_tty_shutdown(info); isdn_tty_shutdown(info);
info->count = 0; info->count = 0;
info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE); info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE);
info->tty = 0; info->tty = NULL;
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->open_wait);
} }
...@@ -1959,7 +1959,7 @@ isdn_tty_modem_init(void) ...@@ -1959,7 +1959,7 @@ isdn_tty_modem_init(void)
isdn_tty_modem_reset_regs(info, 1); isdn_tty_modem_reset_regs(info, 1);
info->magic = ISDN_ASYNC_MAGIC; info->magic = ISDN_ASYNC_MAGIC;
info->line = i; info->line = i;
info->tty = 0; info->tty = NULL;
info->x_char = 0; info->x_char = 0;
info->count = 0; info->count = 0;
info->blocked_open = 0; info->blocked_open = 0;
...@@ -2373,8 +2373,8 @@ isdn_tty_at_cout(char *msg, modem_info * info) ...@@ -2373,8 +2373,8 @@ isdn_tty_at_cout(char *msg, modem_info * info)
char *p; char *p;
char c; char c;
u_long flags; u_long flags;
struct sk_buff *skb = 0; struct sk_buff *skb = NULL;
char *sp = 0; char *sp = NULL;
if (!msg) { if (!msg) {
printk(KERN_WARNING "isdn_tty: Null-Message in isdn_tty_at_cout\n"); printk(KERN_WARNING "isdn_tty: Null-Message in isdn_tty_at_cout\n");
......
...@@ -25,11 +25,11 @@ MODULE_LICENSE("GPL"); ...@@ -25,11 +25,11 @@ MODULE_LICENSE("GPL");
MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i"); MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
MODULE_PARM(irq, "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 mem[MAX_PCBIT_CARDS];
static int irq[MAX_PCBIT_CARDS] = {0, }; static int irq[MAX_PCBIT_CARDS];
static int num_boards; 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 void pcbit_terminate(int board);
extern int pcbit_init_dev(int board, int mem_base, int irq); extern int pcbit_init_dev(int board, int mem_base, int irq);
......
...@@ -215,7 +215,7 @@ int startproc(int card) ...@@ -215,7 +215,7 @@ int startproc(int card)
status = sendmessage(card, CMPID,cmReqType2, status = sendmessage(card, CMPID,cmReqType2,
cmReqClass0, cmReqClass0,
cmReqStartProc, cmReqStartProc,
0,0,0); 0,0,NULL);
pr_debug("%s: Sent startProc\n", sc_adapter[card]->devicename); pr_debug("%s: Sent startProc\n", sc_adapter[card]->devicename);
return status; return status;
......
...@@ -152,7 +152,7 @@ int sc_ioctl(int card, scs_ioctl *data) ...@@ -152,7 +152,7 @@ int sc_ioctl(int card, scs_ioctl *data)
* Get the switch type from the board * Get the switch type from the board
*/ */
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0, 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)) { if (!status && !(rcvmsg->rsp_status)) {
pr_debug("%s: SCIOCGETSWITCH: command successful\n", pr_debug("%s: SCIOCGETSWITCH: command successful\n",
sc_adapter[card]->devicename); sc_adapter[card]->devicename);
...@@ -193,7 +193,7 @@ int sc_ioctl(int card, scs_ioctl *data) ...@@ -193,7 +193,7 @@ int sc_ioctl(int card, scs_ioctl *data)
* Get the spid from the board * Get the spid from the board
*/ */
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0, ceReqCallGetSPID, 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) { if (!status) {
pr_debug("%s: SCIOCGETSPID: command successful\n", pr_debug("%s: SCIOCGETSPID: command successful\n",
sc_adapter[card]->devicename); sc_adapter[card]->devicename);
...@@ -269,7 +269,7 @@ int sc_ioctl(int card, scs_ioctl *data) ...@@ -269,7 +269,7 @@ int sc_ioctl(int card, scs_ioctl *data)
* Get the dn from the board * Get the dn from the board
*/ */
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0, ceReqCallGetMyNumber, 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) { if (!status) {
pr_debug("%s: SCIOCGETDN: command successful\n", pr_debug("%s: SCIOCGETDN: command successful\n",
sc_adapter[card]->devicename); sc_adapter[card]->devicename);
...@@ -385,7 +385,7 @@ int sc_ioctl(int card, scs_ioctl *data) ...@@ -385,7 +385,7 @@ int sc_ioctl(int card, scs_ioctl *data)
* Get the speed from the board * Get the speed from the board
*/ */
status = send_and_receive(card, CEPID, ceReqTypeCall, ceReqClass0, 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)) { if (!status && !(rcvmsg->rsp_status)) {
pr_debug("%s: SCIOCGETSPEED: command successful\n", pr_debug("%s: SCIOCGETSPEED: command successful\n",
sc_adapter[card]->devicename); sc_adapter[card]->devicename);
......
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