V4L/DVB (4288): Clean out a zillion sparse warnings in pvrusb2

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 313d2dc..9846c46 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -145,8 +145,8 @@
 
 static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt)
 {
-	ctxt->client->handler = 0;
-	ctxt->hdw->audio_stat = 0;
+	ctxt->client->handler = NULL;
+	ctxt->hdw->audio_stat = NULL;
 	kfree(ctxt);
 }
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c
index 40dc598..f129f31 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -77,7 +77,7 @@
 	const struct usb_device_id *devid,
 	void (*setup_func)(struct pvr2_context *))
 {
-	struct pvr2_context *mp = 0;
+	struct pvr2_context *mp = NULL;
 	mp = kmalloc(sizeof(*mp),GFP_KERNEL);
 	if (!mp) goto done;
 	memset(mp,0,sizeof(*mp));
@@ -87,7 +87,7 @@
 	mp->hdw = pvr2_hdw_create(intf,devid);
 	if (!mp->hdw) {
 		pvr2_context_destroy(mp);
-		mp = 0;
+		mp = NULL;
 		goto done;
 	}
 
@@ -145,7 +145,7 @@
 {
 	cp->hdw = mp->hdw;
 	cp->mc_head = mp;
-	cp->mc_next = 0;
+	cp->mc_next = NULL;
 	cp->mc_prev = mp->mc_last;
 	if (mp->mc_last) {
 		mp->mc_last->mc_next = cp;
@@ -160,8 +160,8 @@
 {
 	if (!cp->stream) return;
 	pvr2_stream_kill(cp->stream->stream);
-	cp->stream->user = 0;
-	cp->stream = 0;
+	cp->stream->user = NULL;
+	cp->stream = NULL;
 }
 
 
@@ -179,7 +179,7 @@
 	} else {
 		mp->mc_first = cp->mc_next;
 	}
-	cp->hdw = 0;
+	cp->hdw = NULL;
 }
 
 
@@ -212,7 +212,7 @@
 {
 	struct pvr2_ioread *cp;
 	cp = pvr2_ioread_create();
-	if (!cp) return 0;
+	if (!cp) return NULL;
 	pvr2_ioread_setup(cp,sp->stream);
 	pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key));
 	return cp;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
index d5df9fb..fb6198f 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
@@ -158,7 +158,7 @@
 /* Retrieve the control's name */
 const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr)
 {
-	if (!cptr) return 0;
+	if (!cptr) return NULL;
 	return cptr->info->name;
 }
 
@@ -166,7 +166,7 @@
 /* Retrieve the control's desc */
 const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr)
 {
-	if (!cptr) return 0;
+	if (!cptr) return NULL;
 	return cptr->info->desc;
 }
 
@@ -488,7 +488,7 @@
 
 	LOCK_TAKE(cptr->hdw->big_lock); do {
 		if (cptr->info->type == pvr2_ctl_int) {
-			ret = parse_token(ptr,len,valptr,0,0);
+			ret = parse_token(ptr,len,valptr,NULL,0);
 			if ((ret >= 0) &&
 			    ((*valptr < cptr->info->def.type_int.min_value) ||
 			     (*valptr > cptr->info->def.type_int.max_value))) {
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index 27eadaf..c80c26b 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -139,8 +139,8 @@
 
 static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt)
 {
-	ctxt->client->handler = 0;
-	ctxt->hdw->decoder_ctrl = 0;
+	ctxt->client->handler = NULL;
+	ctxt->hdw->decoder_ctrl = NULL;
 	kfree(ctxt);
 }
 
@@ -221,7 +221,7 @@
 static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt)
 {
 	int ret;
-	ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,0);
+	ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,NULL);
 	pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret);
 }
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
index 8092b23..f985f00 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
@@ -82,7 +82,7 @@
 	unsigned int wlen;
 	unsigned int scnt;
 
-	wptr = 0;
+	wptr = NULL;
 	wlen = 0;
 	scnt = debugifc_count_whitespace(buf,count);
 	consume_cnt += scnt; count -= scnt; buf += scnt;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
index 94d383f..6cff8e7 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
@@ -58,7 +58,7 @@
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
 			   "Failed to allocate memory"
 			   " required to read eeprom");
-		return 0;
+		return NULL;
 	}
 
 	trace_eeprom("Value for eeprom addr from controller was 0x%x",
@@ -108,7 +108,7 @@
 			pvr2_trace(PVR2_TRACE_ERROR_LEGS,
 				   "eeprom fetch set offs err=%d",ret);
 			kfree(eeprom);
-			return 0;
+			return NULL;
 		}
 	}
 	return eeprom;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index 2cc3169..18a7073 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -65,7 +65,7 @@
 		}
 		ret = pvr2_send_request(hdw,
 					hdw->cmd_buffer,1+(chunkCnt*7),
-					0,0);
+					NULL,0);
 		if (ret) return ret;
 		data += chunkCnt;
 		dlen -= chunkCnt;
@@ -322,7 +322,7 @@
 	}
 
 	ret = cx2341x_update(hdw,pvr2_encoder_cmd,
-			     (hdw->enc_cur_valid ? &hdw->enc_cur_state : 0),
+			     (hdw->enc_cur_valid ? &hdw->enc_cur_state : NULL),
 			     &hdw->enc_ctl_state);
 	if (ret) {
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 9638591..9b48abc 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -87,7 +87,7 @@
 #endif
 };
 
-static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = 0};
+static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL};
 static DECLARE_MUTEX(pvr2_unit_sem);
 
 static int ctlchg = 0;
@@ -422,7 +422,7 @@
 	info = (struct pvr2_ctl_info *)(cptr->info);
 	if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) {
 		if (info->set_value) {
-			info->set_value = 0;
+			info->set_value = NULL;
 		}
 	} else {
 		if (!(info->set_value)) {
@@ -928,7 +928,7 @@
  */
 static int pvr2_upload_firmware1(struct pvr2_hdw *hdw)
 {
-	const struct firmware *fw_entry = 0;
+	const struct firmware *fw_entry = NULL;
 	void  *fw_ptr;
 	unsigned int pipe;
 	int ret;
@@ -1024,7 +1024,7 @@
 
 int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
 {
-	const struct firmware *fw_entry = 0;
+	const struct firmware *fw_entry = NULL;
 	void  *fw_ptr;
 	unsigned int pipe, fw_len, fw_done;
 	int actual_length;
@@ -1739,7 +1739,7 @@
 	    sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) {
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
 			   "Bogus device type of %u reported",hdw_type);
-		return 0;
+		return NULL;
 	}
 
 	hdw = kmalloc(sizeof(*hdw),GFP_KERNEL);
@@ -1920,7 +1920,7 @@
 		if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info);
 		kfree(hdw);
 	}
-	return 0;
+	return NULL;
 }
 
 
@@ -1933,25 +1933,25 @@
 	if (hdw->ctl_read_urb) {
 		usb_kill_urb(hdw->ctl_read_urb);
 		usb_free_urb(hdw->ctl_read_urb);
-		hdw->ctl_read_urb = 0;
+		hdw->ctl_read_urb = NULL;
 	}
 	if (hdw->ctl_write_urb) {
 		usb_kill_urb(hdw->ctl_write_urb);
 		usb_free_urb(hdw->ctl_write_urb);
-		hdw->ctl_write_urb = 0;
+		hdw->ctl_write_urb = NULL;
 	}
 	if (hdw->ctl_read_buffer) {
 		kfree(hdw->ctl_read_buffer);
-		hdw->ctl_read_buffer = 0;
+		hdw->ctl_read_buffer = NULL;
 	}
 	if (hdw->ctl_write_buffer) {
 		kfree(hdw->ctl_write_buffer);
-		hdw->ctl_write_buffer = 0;
+		hdw->ctl_write_buffer = NULL;
 	}
 	pvr2_hdw_render_useless_unlocked(hdw);
 	hdw->flag_disconnected = !0;
-	hdw->usb_dev = 0;
-	hdw->usb_intf = 0;
+	hdw->usb_dev = NULL;
+	hdw->usb_intf = NULL;
 }
 
 
@@ -1961,11 +1961,11 @@
 	pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw);
 	if (hdw->fw_buffer) {
 		kfree(hdw->fw_buffer);
-		hdw->fw_buffer = 0;
+		hdw->fw_buffer = NULL;
 	}
 	if (hdw->vid_stream) {
 		pvr2_stream_destroy(hdw->vid_stream);
-		hdw->vid_stream = 0;
+		hdw->vid_stream = NULL;
 	}
 	if (hdw->audio_stat) {
 		hdw->audio_stat->detach(hdw->audio_stat->ctxt);
@@ -1979,7 +1979,7 @@
 		if ((hdw->unit_number >= 0) &&
 		    (hdw->unit_number < PVR_NUM) &&
 		    (unit_pointers[hdw->unit_number] == hdw)) {
-			unit_pointers[hdw->unit_number] = 0;
+			unit_pointers[hdw->unit_number] = NULL;
 		}
 	} while (0); up(&pvr2_unit_sem);
 	if (hdw->controls) kfree(hdw->controls);
@@ -2041,12 +2041,12 @@
 
 	if (hdw->std_defs) {
 		kfree(hdw->std_defs);
-		hdw->std_defs = 0;
+		hdw->std_defs = NULL;
 	}
 	hdw->std_enum_cnt = 0;
 	if (hdw->std_enum_names) {
 		kfree(hdw->std_enum_names);
-		hdw->std_enum_names = 0;
+		hdw->std_enum_names = NULL;
 	}
 
 	if (!std_cnt) {
@@ -2097,7 +2097,7 @@
 struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw,
 					     unsigned int idx)
 {
-	if (idx >= hdw->control_cnt) return 0;
+	if (idx >= hdw->control_cnt) return NULL;
 	return hdw->controls + idx;
 }
 
@@ -2116,7 +2116,7 @@
 		i = cptr->info->internal_id;
 		if (i && (i == ctl_id)) return cptr;
 	}
-	return 0;
+	return NULL;
 }
 
 
@@ -2133,7 +2133,7 @@
 		i = cptr->info->v4l_id;
 		if (i && (i == ctl_id)) return cptr;
 	}
-	return 0;
+	return NULL;
 }
 
 
@@ -2147,7 +2147,7 @@
 	int i;
 
 	/* This could be made a lot more efficient, but for now... */
-	cp2 = 0;
+	cp2 = NULL;
 	for (idx = 0; idx < hdw->control_cnt; idx++) {
 		cptr = hdw->controls + idx;
 		i = cptr->info->v4l_id;
@@ -2157,7 +2157,7 @@
 		cp2 = cptr;
 	}
 	return cp2;
-	return 0;
+	return NULL;
 }
 
 
@@ -2414,7 +2414,7 @@
 			pvr2_trace(PVR2_TRACE_FIRMWARE,
 				   "Cleaning up after CPU firmware fetch");
 			kfree(hdw->fw_buffer);
-			hdw->fw_buffer = 0;
+			hdw->fw_buffer = NULL;
 			hdw->fw_size = 0;
 			/* Now release the CPU.  It will disconnect and
 			   reconnect later. */
@@ -2863,7 +2863,7 @@
 	pvr2_trace(PVR2_TRACE_INIT,"render_useless");
 	hdw->flag_ok = 0;
 	if (hdw->vid_stream) {
-		pvr2_stream_setup(hdw->vid_stream,0,0,0);
+		pvr2_stream_setup(hdw->vid_stream,NULL,0,0);
 	}
 	hdw->flag_streaming_enabled = 0;
 	hdw->subsys_enabled_mask = 0;
@@ -2882,7 +2882,7 @@
 {
 	int ret;
 	pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset...");
-	ret = usb_lock_device_for_reset(hdw->usb_dev,0);
+	ret = usb_lock_device_for_reset(hdw->usb_dev,NULL);
 	if (ret == 1) {
 		ret = usb_reset_device(hdw->usb_dev);
 		usb_unlock_device(hdw->usb_dev);
@@ -2931,7 +2931,7 @@
 		pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset");
 		hdw->flag_ok = !0;
 		hdw->cmd_buffer[0] = 0xdd;
-		status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0);
+		status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0);
 	} while (0); LOCK_GIVE(hdw->ctl_lock);
 	return status;
 }
@@ -2943,7 +2943,7 @@
 	LOCK_TAKE(hdw->ctl_lock); do {
 		pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup");
 		hdw->cmd_buffer[0] = 0xde;
-		status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0);
+		status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0);
 	} while (0); LOCK_GIVE(hdw->ctl_lock);
 	return status;
 }
@@ -2975,7 +2975,7 @@
 	int status;
 	LOCK_TAKE(hdw->ctl_lock); do {
 		hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37);
-		status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0);
+		status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0);
 	} while (0); LOCK_GIVE(hdw->ctl_lock);
 	if (!status) {
 		hdw->subsys_enabled_mask =
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
index 9f81aff..8a9933d 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
@@ -196,7 +196,7 @@
 static void do_log(struct pvr2_hdw *hdw)
 {
 	pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()");
-	pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,0);
+	pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,NULL);
 
 }
 
@@ -217,7 +217,7 @@
 void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl)
 {
 	pvr2_i2c_client_cmd(cp,
-			    (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),0);
+			    (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),NULL);
 }
 
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index eca48c9..7fca479 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -271,7 +271,7 @@
 			   "WARNING: Disabling further access to the device"
 			   " to prevent other foul-ups.");
 		// This blocks all further communication with the part.
-		hdw->i2c_func[0x44] = 0;
+		hdw->i2c_func[0x44] = NULL;
 		pvr2_hdw_render_useless(hdw);
 		goto fail;
 	}
@@ -298,7 +298,7 @@
 			 int num)
 {
 	int ret = -ENOTSUPP;
-	pvr2_i2c_func funcp = 0;
+	pvr2_i2c_func funcp = NULL;
 	struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data);
 
 	if (!num) {
@@ -323,7 +323,7 @@
 			u16 tcnt,bcnt,offs;
 			if (!msgs[0].len) {
 				/* Length == 0 read.  This is a probe. */
-				if (funcp(hdw,msgs[0].addr,0,0,0,0)) {
+				if (funcp(hdw,msgs[0].addr,NULL,0,NULL,0)) {
 					ret = -EIO;
 					goto done;
 				}
@@ -340,7 +340,7 @@
 				if (bcnt > sizeof(hdw->cmd_buffer)-1) {
 					bcnt = sizeof(hdw->cmd_buffer)-1;
 				}
-				if (funcp(hdw,msgs[0].addr,0,0,
+				if (funcp(hdw,msgs[0].addr,NULL,0,
 					  msgs[0].buf+offs,bcnt)) {
 					ret = -EIO;
 					goto done;
@@ -354,7 +354,7 @@
 			/* Simple write */
 			ret = 1;
 			if (funcp(hdw,msgs[0].addr,
-				  msgs[0].buf,msgs[0].len,0,0)) {
+				  msgs[0].buf,msgs[0].len,NULL,0)) {
 				ret = -EIO;
 			}
 			goto done;
@@ -875,7 +875,7 @@
 	msg[0].addr = 0;
 	msg[0].flags = I2C_M_RD;
 	msg[0].len = 0;
-	msg[0].buf = 0;
+	msg[0].buf = NULL;
 	printk("%s: i2c scan beginning\n",hdw->name);
 	for (i = 0; i < 128; i++) {
 		msg[0].addr = i;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c
index c032777..681f79c 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-io.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-io.c
@@ -116,8 +116,8 @@
 		   (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"),
 		   (bp ? bp->id : 0),
 		   (bp ? bp->status : 0),
-		   (bp ? bp->stream : 0),
-		   (bp ? bp->purb : 0),
+		   (bp ? bp->stream : NULL),
+		   (bp ? bp->purb : NULL),
 		   (bp ? bp->signature : 0));
 }
 #endif  /*  SANITY_CHECK_BUFFERS  */
@@ -286,7 +286,7 @@
 	pvr2_buffer_wipe(bp);
 	pvr2_buffer_set_none(bp);
 	bp->signature = 0;
-	bp->stream = 0;
+	bp->stream = NULL;
 	if (bp->purb) usb_free_urb(bp->purb);
 	pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/"
 		   " bufferDone     %p",bp);
@@ -341,13 +341,13 @@
 			struct pvr2_buffer *bp;
 			bp = sp->buffers[sp->buffer_total_count - 1];
 			/* Paranoia */
-			sp->buffers[sp->buffer_total_count - 1] = 0;
+			sp->buffers[sp->buffer_total_count - 1] = NULL;
 			(sp->buffer_total_count)--;
 			pvr2_buffer_done(bp);
 			kfree(bp);
 		}
 		if (scnt < sp->buffer_slot_count) {
-			struct pvr2_buffer **nb = 0;
+			struct pvr2_buffer **nb = NULL;
 			if (scnt) {
 				nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL);
 				if (!nb) return -ENOMEM;
@@ -530,21 +530,21 @@
 struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp)
 {
 	struct list_head *lp = sp->idle_list.next;
-	if (lp == &sp->idle_list) return 0;
+	if (lp == &sp->idle_list) return NULL;
 	return list_entry(lp,struct pvr2_buffer,list_overhead);
 }
 
 struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp)
 {
 	struct list_head *lp = sp->ready_list.next;
-	if (lp == &sp->ready_list) return 0;
+	if (lp == &sp->ready_list) return NULL;
 	return list_entry(lp,struct pvr2_buffer,list_overhead);
 }
 
 struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id)
 {
-	if (id < 0) return 0;
-	if (id >= sp->buffer_total_count) return 0;
+	if (id < 0) return NULL;
+	if (id >= sp->buffer_total_count) return NULL;
 	return sp->buffers[id];
 }
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c
index 4dce1a4..f7a2e22 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.c
@@ -54,7 +54,7 @@
 {
 	unsigned int idx;
 
-	cp->stream = 0;
+	cp->stream = NULL;
 	mutex_init(&cp->mutex);
 
 	for (idx = 0; idx < BUFFER_COUNT; idx++) {
@@ -77,7 +77,7 @@
 {
 	unsigned int idx;
 
-	pvr2_ioread_setup(cp,0);
+	pvr2_ioread_setup(cp,NULL);
 	for (idx = 0; idx < BUFFER_COUNT; idx++) {
 		if (!(cp->buffer_storage[idx])) continue;
 		kfree(cp->buffer_storage[idx]);
@@ -88,12 +88,12 @@
 {
 	struct pvr2_ioread *cp;
 	cp = kmalloc(sizeof(*cp),GFP_KERNEL);
-	if (!cp) return 0;
+	if (!cp) return NULL;
 	pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp);
 	memset(cp,0,sizeof(*cp));
 	if (pvr2_ioread_init(cp) < 0) {
 		kfree(cp);
-		return 0;
+		return NULL;
 	}
 	return cp;
 }
@@ -105,7 +105,7 @@
 	pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp);
 	if (cp->sync_key_ptr) {
 		kfree(cp->sync_key_ptr);
-		cp->sync_key_ptr = 0;
+		cp->sync_key_ptr = NULL;
 	}
 	kfree(cp);
 }
@@ -124,7 +124,7 @@
 	if (sync_key_len != cp->sync_key_len) {
 		if (cp->sync_key_ptr) {
 			kfree(cp->sync_key_ptr);
-			cp->sync_key_ptr = 0;
+			cp->sync_key_ptr = NULL;
 		}
 		cp->sync_key_len = 0;
 		if (sync_key_len) {
@@ -144,8 +144,8 @@
 	pvr2_trace(PVR2_TRACE_START_STOP,
 		   "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp);
 	pvr2_stream_kill(cp->stream);
-	cp->c_buf = 0;
-	cp->c_data_ptr = 0;
+	cp->c_buf = NULL;
+	cp->c_data_ptr = NULL;
 	cp->c_data_len = 0;
 	cp->c_data_offs = 0;
 	cp->enabled = 0;
@@ -179,8 +179,8 @@
 		}
 	}
 	cp->enabled = !0;
-	cp->c_buf = 0;
-	cp->c_data_ptr = 0;
+	cp->c_buf = NULL;
+	cp->c_data_ptr = NULL;
 	cp->c_data_len = 0;
 	cp->c_data_offs = 0;
 	cp->stream_running = 0;
@@ -214,7 +214,7 @@
 			pvr2_ioread_stop(cp);
 			pvr2_stream_kill(cp->stream);
 			pvr2_stream_set_buffer_count(cp->stream,0);
-			cp->stream = 0;
+			cp->stream = NULL;
 		}
 		if (sp) {
 			pvr2_trace(PVR2_TRACE_START_STOP,
@@ -270,8 +270,8 @@
 				pvr2_ioread_stop(cp);
 				return 0;
 			}
-			cp->c_buf = 0;
-			cp->c_data_ptr = 0;
+			cp->c_buf = NULL;
+			cp->c_data_ptr = NULL;
 			cp->c_data_len = 0;
 			cp->c_data_offs = 0;
 		}
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c
index b952482..8f1a5af 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -54,7 +54,7 @@
 MODULE_PARM_DESC(debug, "Debug trace mask");
 
 #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
-static struct pvr2_sysfs_class *class_ptr = 0;
+static struct pvr2_sysfs_class *class_ptr = NULL;
 #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
 
 static void pvr_setup_attach(struct pvr2_context *pvr)
@@ -104,10 +104,10 @@
 }
 
 static struct usb_driver pvr_driver = {
-	name:           "pvrusb2",
-	id_table:       pvr2_device_table,
-	probe:          pvr_probe,
-	disconnect:     pvr_disconnect
+	.name =         "pvrusb2",
+	.id_table =     pvr2_device_table,
+	.probe =        pvr_probe,
+	.disconnect =   pvr_disconnect
 };
 
 /*
diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c
index 1340636..f95c598 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-std.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-std.c
@@ -121,7 +121,7 @@
 		if (strlen(p->name) != bufSize) continue;
 		if (!memcmp(bufPtr,p->name,bufSize)) return p;
 	}
-	return 0;
+	return NULL;
 }
 
 
@@ -289,7 +289,7 @@
 			return generic_standards + idx;
 		}
 	}
-	return 0;
+	return NULL;
 }
 
 static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id)
@@ -364,7 +364,7 @@
 
 	pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)",
 		   std_cnt);
-	if (!std_cnt) return 0; // paranoia
+	if (!std_cnt) return NULL; // paranoia
 
 	stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt,
 			  GFP_KERNEL);
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
index c6e6523..6af55a8 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
@@ -504,7 +504,7 @@
 	cip->cptr = cptr;
 
 	cip->chptr = sfp;
-	cip->item_next = 0;
+	cip->item_next = NULL;
 	if (sfp->item_last) {
 		sfp->item_last->item_next = cip;
 	} else {
@@ -625,7 +625,7 @@
 				 &sfp->debugifc->attr_debuginfo);
 	class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd);
 	kfree(sfp->debugifc);
-	sfp->debugifc = 0;
+	sfp->debugifc = NULL;
 }
 #endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */
 
@@ -678,9 +678,9 @@
 	class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number);
 	class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number);
 	pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev);
-	sfp->class_dev->class_data = 0;
+	sfp->class_dev->class_data = NULL;
 	class_device_unregister(sfp->class_dev);
-	sfp->class_dev = 0;
+	sfp->class_dev = NULL;
 }
 
 
@@ -739,13 +739,13 @@
 	sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number";
 	sfp->attr_v4l_minor_number.attr.mode = S_IRUGO;
 	sfp->attr_v4l_minor_number.show = v4l_minor_number_show;
-	sfp->attr_v4l_minor_number.store = 0;
+	sfp->attr_v4l_minor_number.store = NULL;
 	class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number);
 	sfp->attr_unit_number.attr.owner = THIS_MODULE;
 	sfp->attr_unit_number.attr.name = "unit_number";
 	sfp->attr_unit_number.attr.mode = S_IRUGO;
 	sfp->attr_unit_number.show = unit_number_show;
-	sfp->attr_unit_number.store = 0;
+	sfp->attr_unit_number.store = NULL;
 	class_device_create_file(sfp->class_dev,&sfp->attr_unit_number);
 
 	pvr2_sysfs_add_controls(sfp);
@@ -806,7 +806,7 @@
 		pvr2_sysfs_trace(
 			"Registration failed for pvr2_sysfs_class id=%p",clp);
 		kfree(clp);
-		clp = 0;
+		clp = NULL;
 	}
 	return clp;
 }
diff --git a/drivers/media/video/pvrusb2/pvrusb2-tuner.c b/drivers/media/video/pvrusb2/pvrusb2-tuner.c
index f4aba81..af9f246 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-tuner.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-tuner.c
@@ -69,7 +69,7 @@
 
 static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt)
 {
-	ctxt->client->handler = 0;
+	ctxt->client->handler = NULL;
 	kfree(ctxt);
 }
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index b12c2a7..0caf70b 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -760,9 +760,9 @@
 		hdw = fhp->channel.mc_head->hdw;
 		pvr2_hdw_set_streaming(hdw,0);
 		sp = pvr2_ioread_get_stream(fhp->rhp);
-		if (sp) pvr2_stream_set_callback(sp,0,0);
+		if (sp) pvr2_stream_set_callback(sp,NULL,NULL);
 		pvr2_ioread_destroy(fhp->rhp);
-		fhp->rhp = 0;
+		fhp->rhp = NULL;
 	}
 	v4l2_prio_close(&vp->prio, &fhp->prio);
 	file->private_data = NULL;
@@ -778,9 +778,9 @@
 		} else {
 			vp->vfirst = fhp->vnext;
 		}
-		fhp->vnext = 0;
-		fhp->vprev = 0;
-		fhp->vhead = 0;
+		fhp->vnext = NULL;
+		fhp->vprev = NULL;
+		fhp->vhead = NULL;
 		pvr2_channel_done(&fhp->channel);
 		pvr2_trace(PVR2_TRACE_STRUCT,
 			   "Destroying pvr_v4l2_fh id=%p",fhp);
@@ -795,7 +795,7 @@
 
 static int pvr2_v4l2_open(struct inode *inode, struct file *file)
 {
-	struct pvr2_v4l2_dev *dip = 0; /* Our own context pointer */
+	struct pvr2_v4l2_dev *dip = NULL; /* Our own context pointer */
 	struct pvr2_v4l2_fh *fhp;
 	struct pvr2_v4l2 *vp;
 	struct pvr2_hdw *hdw;
@@ -853,7 +853,7 @@
 	pvr2_context_enter(vp->channel.mc_head); do {
 		pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp);
 		pvr2_channel_init(&fhp->channel,vp->channel.mc_head);
-		fhp->vnext = 0;
+		fhp->vnext = NULL;
 		fhp->vprev = vp->vlast;
 		if (vp->vlast) {
 			vp->vlast->vnext = fhp;
@@ -896,7 +896,7 @@
 
 	fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream);
 	if (!fh->rhp) {
-		pvr2_channel_claim_stream(&fh->channel,0);
+		pvr2_channel_claim_stream(&fh->channel,NULL);
 		return -ENOMEM;
 	}
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
index e4ec7f2..05f2cdd 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
@@ -126,8 +126,8 @@
 
 static void decoder_detach(struct pvr2_v4l_decoder *ctxt)
 {
-	ctxt->client->handler = 0;
-	ctxt->hdw->decoder_ctrl = 0;
+	ctxt->client->handler = NULL;
+	ctxt->hdw->decoder_ctrl = NULL;
 	kfree(ctxt);
 }
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
index fcad346..2413e51 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
@@ -89,7 +89,7 @@
 
 static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt)
 {
-	ctxt->client->handler = 0;
+	ctxt->client->handler = NULL;
 	kfree(ctxt);
 }