diff options
Diffstat (limited to 'drivers/media')
19 files changed, 105 insertions, 105 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c index 313d2dcf9e4..9846c464ec8 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-audio.c +++ b/drivers/media/video/pvrusb2/pvrusb2-audio.c @@ -145,8 +145,8 @@ static int get_audio_status(struct pvr2_msp3400_handler *ctxt) 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 40dc59871a4..f129f316d20 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c @@ -77,7 +77,7 @@ struct pvr2_context *pvr2_context_create( 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 @@ struct pvr2_context *pvr2_context_create( mp->hdw = pvr2_hdw_create(intf,devid); if (!mp->hdw) { pvr2_context_destroy(mp); - mp = 0; + mp = NULL; goto done; } @@ -145,7 +145,7 @@ void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp) { 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 @@ static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp) { 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 @@ void pvr2_channel_done(struct pvr2_channel *cp) } else { mp->mc_first = cp->mc_next; } - cp->hdw = 0; + cp->hdw = NULL; } @@ -212,7 +212,7 @@ struct pvr2_ioread *pvr2_channel_create_mpeg_stream( { 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 d5df9fbeba2..fb6198f1df9 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -158,7 +158,7 @@ int pvr2_ctrl_get_mask(struct pvr2_ctrl *cptr) /* 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 @@ const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) /* 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 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, 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 27eadaff75a..c80c26be6e4 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c @@ -139,8 +139,8 @@ static const struct pvr2_v4l_cx2584x_ops decoder_ops[] = { 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 unsigned int decoder_describe(struct pvr2_v4l_cx2584x *ctxt, 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 8092b239cf2..f985f00d885 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c +++ b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c @@ -82,7 +82,7 @@ static unsigned int debugifc_isolate_word(const char *buf,unsigned int count, 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 94d383ff988..6cff8e75f42 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c +++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c @@ -58,7 +58,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) 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 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) 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 2cc31695b43..18a7073501c 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c +++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c @@ -65,7 +65,7 @@ static int pvr2_encoder_write_words(struct pvr2_hdw *hdw, } 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 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw) } 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 9638591cc06..9b48abcf608 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -87,7 +87,7 @@ static struct pvr2_string_table pvr2_client_lists[] = { #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 @@ static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr) 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_locate_firmware(struct pvr2_hdw *hdw, */ 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 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) 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 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, 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 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); kfree(hdw); } - return 0; + return NULL; } @@ -1933,25 +1933,25 @@ static void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw) 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 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw) 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 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw) 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 @@ static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw) 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 @@ unsigned int pvr2_hdw_get_ctrl_count(struct pvr2_hdw *hdw) 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 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_id(struct pvr2_hdw *hdw, i = cptr->info->internal_id; if (i && (i == ctl_id)) return cptr; } - return 0; + return NULL; } @@ -2133,7 +2133,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_v4l(struct pvr2_hdw *hdw,unsigned int ctl_id i = cptr->info->v4l_id; if (i && (i == ctl_id)) return cptr; } - return 0; + return NULL; } @@ -2147,7 +2147,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw, 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 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw, cp2 = cptr; } return cp2; - return 0; + return NULL; } @@ -2414,7 +2414,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, int enable_flag) 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 @@ static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw) 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 @@ void pvr2_hdw_device_reset(struct pvr2_hdw *hdw) { 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 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *hdw) 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 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw) 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 @@ static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) 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 9f81aff2b38..8a9933dec91 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 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_size = { 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 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_log = { 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 eca48c90b55..7fca4798227 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c @@ -271,7 +271,7 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw, "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 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, 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 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, 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 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, 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 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, /* 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 @@ static void do_i2c_scan(struct pvr2_hdw *hdw) 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 c032777a977..681f79c8064 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-io.c +++ b/drivers/media/video/pvrusb2/pvrusb2-io.c @@ -116,8 +116,8 @@ static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) (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 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp) 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 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) 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 @@ int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) 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 4dce1a462f5..f7a2e225a00 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.c @@ -54,7 +54,7 @@ static int pvr2_ioread_init(struct pvr2_ioread *cp) { unsigned int idx; - cp->stream = 0; + cp->stream = NULL; mutex_init(&cp->mutex); for (idx = 0; idx < BUFFER_COUNT; idx++) { @@ -77,7 +77,7 @@ static void pvr2_ioread_done(struct pvr2_ioread *cp) { 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 *pvr2_ioread_create(void) { 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 @@ void pvr2_ioread_destroy(struct pvr2_ioread *cp) 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 @@ void pvr2_ioread_set_sync_key(struct pvr2_ioread *cp, 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 @@ static void pvr2_ioread_stop(struct pvr2_ioread *cp) 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 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp) } } 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 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) 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 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) 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 b95248274ed..8f1a5afdd34 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/drivers/media/video/pvrusb2/pvrusb2-main.c @@ -54,7 +54,7 @@ module_param_named(debug,pvrusb2_debug,int,S_IRUGO|S_IWUSR); 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 void pvr_disconnect(struct usb_interface *intf) } 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 13406369364..f95c598ff62 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-std.c +++ b/drivers/media/video/pvrusb2/pvrusb2-std.c @@ -121,7 +121,7 @@ static const struct std_name *find_std_name(const struct std_name *arrPtr, if (strlen(p->name) != bufSize) continue; if (!memcmp(bufPtr,p->name,bufSize)) return p; } - return 0; + return NULL; } @@ -289,7 +289,7 @@ static struct v4l2_standard *match_std(v4l2_std_id id) 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 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr, 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 c6e6523d74b..6af55a8b6f0 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c @@ -504,7 +504,7 @@ static void pvr2_sysfs_add_control(struct pvr2_sysfs *sfp,int ctl_id) 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 @@ static void pvr2_sysfs_tear_down_debugifc(struct pvr2_sysfs *sfp) &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 @@ static void class_dev_destroy(struct pvr2_sysfs *sfp) 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 @@ static void class_dev_create(struct pvr2_sysfs *sfp, 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 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) 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 f4aba8144ce..af9f246f8d3 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-tuner.c +++ b/drivers/media/video/pvrusb2/pvrusb2-tuner.c @@ -69,7 +69,7 @@ static void tuner_update(struct pvr2_tuner_handler *ctxt) 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 b12c2a7f135..0caf70b8c0d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -760,9 +760,9 @@ static int pvr2_v4l2_release(struct inode *inode, struct file *file) 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 @@ static int pvr2_v4l2_release(struct inode *inode, struct file *file) } 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_release(struct inode *inode, struct file *file) 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 @@ static int pvr2_v4l2_open(struct inode *inode, struct file *file) 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 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) 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 e4ec7f25194..05f2cddeb47 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c @@ -126,8 +126,8 @@ static const struct pvr2_v4l_decoder_ops decoder_ops[] = { 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 fcad346e395..2413e5198e1 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c +++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c @@ -89,7 +89,7 @@ static unsigned int wm8775_describe(struct pvr2_v4l_wm8775 *ctxt, static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt) { - ctxt->client->handler = 0; + ctxt->client->handler = NULL; kfree(ctxt); } |