summaryrefslogtreecommitdiffstats
path: root/drivers/staging/cxt1e1/pmcc4_drv.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-27 09:36:35 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-30 18:48:40 -0700
commit360d26e420786010b79bafd028907ada5db17e11 (patch)
treefffc6ca8ae8777bc7ae867701b47de3f27e65729 /drivers/staging/cxt1e1/pmcc4_drv.c
parentc11afaae49ecff435efb534d05074959cce1757a (diff)
downloadop-kernel-dev-360d26e420786010b79bafd028907ada5db17e11.zip
op-kernel-dev-360d26e420786010b79bafd028907ada5db17e11.tar.gz
staging: cxt1e1: pmcc4_drv.c: Use NULL instead of 0
Pointers should be assigned NULL instead of 0. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/cxt1e1/pmcc4_drv.c')
-rw-r--r--drivers/staging/cxt1e1/pmcc4_drv.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c
index 2383c60..4028ea1 100644
--- a/drivers/staging/cxt1e1/pmcc4_drv.c
+++ b/drivers/staging/cxt1e1/pmcc4_drv.c
@@ -70,7 +70,7 @@ extern void *memset (void *s, int c, size_t n);
#endif
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 -
* DEBUG USAGE */
@@ -119,7 +119,7 @@ c4_find_chan (int channum)
return ch;
}
}
- return 0;
+ return NULL;
}
@@ -145,7 +145,7 @@ c4_new (void *hi)
pr_warning("failed CI malloc, size %u.\n",
(unsigned int) sizeof (ci_t));
- if (CI == 0)
+ if (!CI)
CI = ci; /* DEBUG, only board 0 usage */
return ci;
}
@@ -831,7 +831,7 @@ c4_musycc_rw (ci_t *ci, struct c4_musycc_param *mcp)
{
mpi_t *pi;
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 */
int offset = mcp->offset % 0x800; /* group relative address
* offset, mcp->portnum is
@@ -1060,7 +1060,7 @@ c4_new_chan (ci_t *ci, int portnum, int channum, void *user)
}
/* 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 */
{
ci->first_if = ci->last_if = user;
@@ -1392,7 +1392,7 @@ c4_chan_up (ci_t *ci, int channum)
md->status = HOST_TX_OWNED; /* Host owns TX descriptor ** CODING
* NOTE: HOST_TX_OWNED = 0 so no need to
* byteSwap */
- md->mem_token = 0;
+ md->mem_token = NULL;
md->data = 0;
if (i == (txnum - 1))
{
@@ -1448,10 +1448,10 @@ errfree:
OS_mem_token_free (ch->mdr[i].mem_token);
}
OS_kfree (ch->mdt);
- ch->mdt = 0;
+ ch->mdt = NULL;
ch->txd_num = 0;
OS_kfree (ch->mdr);
- ch->mdr = 0;
+ ch->mdr = NULL;
ch->rxd_num = 0;
ch->state = DOWN;
return ENOBUFS;
OpenPOWER on IntegriCloud