From 360d26e420786010b79bafd028907ada5db17e11 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Fri, 27 Sep 2013 09:36:35 +0530 Subject: [PATCH] staging: cxt1e1: pmcc4_drv.c: Use NULL instead of 0 Pointers should be assigned NULL instead of 0. Signed-off-by: Sachin Kamat Signed-off-by: Greg Kroah-Hartman --- drivers/staging/cxt1e1/pmcc4_drv.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c index 2383c609bf39..4028ea11c442 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; -- 2.39.5