Commit 360d26e4 authored by Sachin Kamat's avatar Sachin Kamat Committed by Greg Kroah-Hartman

staging: cxt1e1: pmcc4_drv.c: Use NULL instead of 0

Pointers should be assigned NULL instead of 0.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c11afaae
...@@ -70,7 +70,7 @@ extern void *memset (void *s, int c, size_t n); ...@@ -70,7 +70,7 @@ extern void *memset (void *s, int c, size_t n);
#endif #endif
int drvr_state = SBE_DRVR_INIT; int drvr_state = SBE_DRVR_INIT;
ci_t *c4_list = 0; ci_t *c4_list = NULL;
ci_t *CI; /* dummy pointer to board ZEROE's data - ci_t *CI; /* dummy pointer to board ZEROE's data -
* DEBUG USAGE */ * DEBUG USAGE */
...@@ -119,7 +119,7 @@ c4_find_chan (int channum) ...@@ -119,7 +119,7 @@ c4_find_chan (int channum)
return ch; return ch;
} }
} }
return 0; return NULL;
} }
...@@ -145,7 +145,7 @@ c4_new (void *hi) ...@@ -145,7 +145,7 @@ c4_new (void *hi)
pr_warning("failed CI malloc, size %u.\n", pr_warning("failed CI malloc, size %u.\n",
(unsigned int) sizeof (ci_t)); (unsigned int) sizeof (ci_t));
if (CI == 0) if (!CI)
CI = ci; /* DEBUG, only board 0 usage */ CI = ci; /* DEBUG, only board 0 usage */
return ci; return ci;
} }
...@@ -831,7 +831,7 @@ c4_musycc_rw (ci_t *ci, struct c4_musycc_param *mcp) ...@@ -831,7 +831,7 @@ c4_musycc_rw (ci_t *ci, struct c4_musycc_param *mcp)
{ {
mpi_t *pi; mpi_t *pi;
volatile u_int32_t *dph; /* hardware implemented register */ volatile u_int32_t *dph; /* hardware implemented register */
u_int32_t *dpr = 0; /* RAM image of registers for group command u_int32_t *dpr = NULL; /* RAM image of registers for group command
* usage */ * usage */
int offset = mcp->offset % 0x800; /* group relative address int offset = mcp->offset % 0x800; /* group relative address
* offset, mcp->portnum is * offset, mcp->portnum is
...@@ -1060,7 +1060,7 @@ c4_new_chan (ci_t *ci, int portnum, int channum, void *user) ...@@ -1060,7 +1060,7 @@ c4_new_chan (ci_t *ci, int portnum, int channum, void *user)
} }
/* save off interface assignments which bound a board */ /* save off interface assignments which bound a board */
if (ci->first_if == 0) /* first channel registered is assumed to if (!ci->first_if) /* first channel registered is assumed to
* be the lowest channel */ * be the lowest channel */
{ {
ci->first_if = ci->last_if = user; ci->first_if = ci->last_if = user;
...@@ -1392,7 +1392,7 @@ c4_chan_up (ci_t *ci, int channum) ...@@ -1392,7 +1392,7 @@ c4_chan_up (ci_t *ci, int channum)
md->status = HOST_TX_OWNED; /* Host owns TX descriptor ** CODING md->status = HOST_TX_OWNED; /* Host owns TX descriptor ** CODING
* NOTE: HOST_TX_OWNED = 0 so no need to * NOTE: HOST_TX_OWNED = 0 so no need to
* byteSwap */ * byteSwap */
md->mem_token = 0; md->mem_token = NULL;
md->data = 0; md->data = 0;
if (i == (txnum - 1)) if (i == (txnum - 1))
{ {
...@@ -1448,10 +1448,10 @@ c4_chan_up (ci_t *ci, int channum) ...@@ -1448,10 +1448,10 @@ c4_chan_up (ci_t *ci, int channum)
OS_mem_token_free (ch->mdr[i].mem_token); OS_mem_token_free (ch->mdr[i].mem_token);
} }
OS_kfree (ch->mdt); OS_kfree (ch->mdt);
ch->mdt = 0; ch->mdt = NULL;
ch->txd_num = 0; ch->txd_num = 0;
OS_kfree (ch->mdr); OS_kfree (ch->mdr);
ch->mdr = 0; ch->mdr = NULL;
ch->rxd_num = 0; ch->rxd_num = 0;
ch->state = DOWN; ch->state = DOWN;
return ENOBUFS; return ENOBUFS;
......
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