diff options
author | Mike Isely <isely@pobox.com> | 2006-06-30 10:35:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-30 14:59:50 -0400 |
commit | a0fd1cb171e8b17339a9a18ae7cf09c50022010f (patch) | |
tree | fdd003ed9f8fe86d20d77fa9bb8da5e13954d494 /drivers/media/video/pvrusb2 | |
parent | 07e337eeab3660559cbe1fee6907d1092037aea7 (diff) |
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>
Diffstat (limited to 'drivers/media/video/pvrusb2')
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 313d2dcf9e4b..9846c464ec80 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) | |||
145 | 145 | ||
146 | static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt) | 146 | static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt) |
147 | { | 147 | { |
148 | ctxt->client->handler = 0; | 148 | ctxt->client->handler = NULL; |
149 | ctxt->hdw->audio_stat = 0; | 149 | ctxt->hdw->audio_stat = NULL; |
150 | kfree(ctxt); | 150 | kfree(ctxt); |
151 | } | 151 | } |
152 | 152 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index 40dc59871a45..f129f316d20e 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( | |||
77 | const struct usb_device_id *devid, | 77 | const struct usb_device_id *devid, |
78 | void (*setup_func)(struct pvr2_context *)) | 78 | void (*setup_func)(struct pvr2_context *)) |
79 | { | 79 | { |
80 | struct pvr2_context *mp = 0; | 80 | struct pvr2_context *mp = NULL; |
81 | mp = kmalloc(sizeof(*mp),GFP_KERNEL); | 81 | mp = kmalloc(sizeof(*mp),GFP_KERNEL); |
82 | if (!mp) goto done; | 82 | if (!mp) goto done; |
83 | memset(mp,0,sizeof(*mp)); | 83 | memset(mp,0,sizeof(*mp)); |
@@ -87,7 +87,7 @@ struct pvr2_context *pvr2_context_create( | |||
87 | mp->hdw = pvr2_hdw_create(intf,devid); | 87 | mp->hdw = pvr2_hdw_create(intf,devid); |
88 | if (!mp->hdw) { | 88 | if (!mp->hdw) { |
89 | pvr2_context_destroy(mp); | 89 | pvr2_context_destroy(mp); |
90 | mp = 0; | 90 | mp = NULL; |
91 | goto done; | 91 | goto done; |
92 | } | 92 | } |
93 | 93 | ||
@@ -145,7 +145,7 @@ void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp) | |||
145 | { | 145 | { |
146 | cp->hdw = mp->hdw; | 146 | cp->hdw = mp->hdw; |
147 | cp->mc_head = mp; | 147 | cp->mc_head = mp; |
148 | cp->mc_next = 0; | 148 | cp->mc_next = NULL; |
149 | cp->mc_prev = mp->mc_last; | 149 | cp->mc_prev = mp->mc_last; |
150 | if (mp->mc_last) { | 150 | if (mp->mc_last) { |
151 | mp->mc_last->mc_next = cp; | 151 | mp->mc_last->mc_next = cp; |
@@ -160,8 +160,8 @@ static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp) | |||
160 | { | 160 | { |
161 | if (!cp->stream) return; | 161 | if (!cp->stream) return; |
162 | pvr2_stream_kill(cp->stream->stream); | 162 | pvr2_stream_kill(cp->stream->stream); |
163 | cp->stream->user = 0; | 163 | cp->stream->user = NULL; |
164 | cp->stream = 0; | 164 | cp->stream = NULL; |
165 | } | 165 | } |
166 | 166 | ||
167 | 167 | ||
@@ -179,7 +179,7 @@ void pvr2_channel_done(struct pvr2_channel *cp) | |||
179 | } else { | 179 | } else { |
180 | mp->mc_first = cp->mc_next; | 180 | mp->mc_first = cp->mc_next; |
181 | } | 181 | } |
182 | cp->hdw = 0; | 182 | cp->hdw = NULL; |
183 | } | 183 | } |
184 | 184 | ||
185 | 185 | ||
@@ -212,7 +212,7 @@ struct pvr2_ioread *pvr2_channel_create_mpeg_stream( | |||
212 | { | 212 | { |
213 | struct pvr2_ioread *cp; | 213 | struct pvr2_ioread *cp; |
214 | cp = pvr2_ioread_create(); | 214 | cp = pvr2_ioread_create(); |
215 | if (!cp) return 0; | 215 | if (!cp) return NULL; |
216 | pvr2_ioread_setup(cp,sp->stream); | 216 | pvr2_ioread_setup(cp,sp->stream); |
217 | pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); | 217 | pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); |
218 | return cp; | 218 | return cp; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index d5df9fbeba2f..fb6198f1df98 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) | |||
158 | /* Retrieve the control's name */ | 158 | /* Retrieve the control's name */ |
159 | const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) | 159 | const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) |
160 | { | 160 | { |
161 | if (!cptr) return 0; | 161 | if (!cptr) return NULL; |
162 | return cptr->info->name; | 162 | return cptr->info->name; |
163 | } | 163 | } |
164 | 164 | ||
@@ -166,7 +166,7 @@ const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) | |||
166 | /* Retrieve the control's desc */ | 166 | /* Retrieve the control's desc */ |
167 | const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr) | 167 | const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr) |
168 | { | 168 | { |
169 | if (!cptr) return 0; | 169 | if (!cptr) return NULL; |
170 | return cptr->info->desc; | 170 | return cptr->info->desc; |
171 | } | 171 | } |
172 | 172 | ||
@@ -488,7 +488,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, | |||
488 | 488 | ||
489 | LOCK_TAKE(cptr->hdw->big_lock); do { | 489 | LOCK_TAKE(cptr->hdw->big_lock); do { |
490 | if (cptr->info->type == pvr2_ctl_int) { | 490 | if (cptr->info->type == pvr2_ctl_int) { |
491 | ret = parse_token(ptr,len,valptr,0,0); | 491 | ret = parse_token(ptr,len,valptr,NULL,0); |
492 | if ((ret >= 0) && | 492 | if ((ret >= 0) && |
493 | ((*valptr < cptr->info->def.type_int.min_value) || | 493 | ((*valptr < cptr->info->def.type_int.min_value) || |
494 | (*valptr > cptr->info->def.type_int.max_value))) { | 494 | (*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 27eadaff75a0..c80c26be6e4d 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[] = { | |||
139 | 139 | ||
140 | static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt) | 140 | static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt) |
141 | { | 141 | { |
142 | ctxt->client->handler = 0; | 142 | ctxt->client->handler = NULL; |
143 | ctxt->hdw->decoder_ctrl = 0; | 143 | ctxt->hdw->decoder_ctrl = NULL; |
144 | kfree(ctxt); | 144 | kfree(ctxt); |
145 | } | 145 | } |
146 | 146 | ||
@@ -221,7 +221,7 @@ static unsigned int decoder_describe(struct pvr2_v4l_cx2584x *ctxt, | |||
221 | static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) | 221 | static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) |
222 | { | 222 | { |
223 | int ret; | 223 | int ret; |
224 | ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,0); | 224 | ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,NULL); |
225 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); | 225 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); |
226 | } | 226 | } |
227 | 227 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c index 8092b239cf27..f985f00d885a 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, | |||
82 | unsigned int wlen; | 82 | unsigned int wlen; |
83 | unsigned int scnt; | 83 | unsigned int scnt; |
84 | 84 | ||
85 | wptr = 0; | 85 | wptr = NULL; |
86 | wlen = 0; | 86 | wlen = 0; |
87 | scnt = debugifc_count_whitespace(buf,count); | 87 | scnt = debugifc_count_whitespace(buf,count); |
88 | consume_cnt += scnt; count -= scnt; buf += scnt; | 88 | 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 94d383ff9889..6cff8e75f426 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) | |||
58 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 58 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
59 | "Failed to allocate memory" | 59 | "Failed to allocate memory" |
60 | " required to read eeprom"); | 60 | " required to read eeprom"); |
61 | return 0; | 61 | return NULL; |
62 | } | 62 | } |
63 | 63 | ||
64 | trace_eeprom("Value for eeprom addr from controller was 0x%x", | 64 | trace_eeprom("Value for eeprom addr from controller was 0x%x", |
@@ -108,7 +108,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) | |||
108 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 108 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
109 | "eeprom fetch set offs err=%d",ret); | 109 | "eeprom fetch set offs err=%d",ret); |
110 | kfree(eeprom); | 110 | kfree(eeprom); |
111 | return 0; | 111 | return NULL; |
112 | } | 112 | } |
113 | } | 113 | } |
114 | return eeprom; | 114 | return eeprom; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c index 2cc31695b435..18a7073501c6 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, | |||
65 | } | 65 | } |
66 | ret = pvr2_send_request(hdw, | 66 | ret = pvr2_send_request(hdw, |
67 | hdw->cmd_buffer,1+(chunkCnt*7), | 67 | hdw->cmd_buffer,1+(chunkCnt*7), |
68 | 0,0); | 68 | NULL,0); |
69 | if (ret) return ret; | 69 | if (ret) return ret; |
70 | data += chunkCnt; | 70 | data += chunkCnt; |
71 | dlen -= chunkCnt; | 71 | dlen -= chunkCnt; |
@@ -322,7 +322,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | ret = cx2341x_update(hdw,pvr2_encoder_cmd, | 324 | ret = cx2341x_update(hdw,pvr2_encoder_cmd, |
325 | (hdw->enc_cur_valid ? &hdw->enc_cur_state : 0), | 325 | (hdw->enc_cur_valid ? &hdw->enc_cur_state : NULL), |
326 | &hdw->enc_ctl_state); | 326 | &hdw->enc_ctl_state); |
327 | if (ret) { | 327 | if (ret) { |
328 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 328 | 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 9638591cc06f..9b48abcf6089 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[] = { | |||
87 | #endif | 87 | #endif |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = 0}; | 90 | static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL}; |
91 | static DECLARE_MUTEX(pvr2_unit_sem); | 91 | static DECLARE_MUTEX(pvr2_unit_sem); |
92 | 92 | ||
93 | static int ctlchg = 0; | 93 | static int ctlchg = 0; |
@@ -422,7 +422,7 @@ static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr) | |||
422 | info = (struct pvr2_ctl_info *)(cptr->info); | 422 | info = (struct pvr2_ctl_info *)(cptr->info); |
423 | if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) { | 423 | if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) { |
424 | if (info->set_value) { | 424 | if (info->set_value) { |
425 | info->set_value = 0; | 425 | info->set_value = NULL; |
426 | } | 426 | } |
427 | } else { | 427 | } else { |
428 | if (!(info->set_value)) { | 428 | if (!(info->set_value)) { |
@@ -928,7 +928,7 @@ static int pvr2_locate_firmware(struct pvr2_hdw *hdw, | |||
928 | */ | 928 | */ |
929 | static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) | 929 | static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) |
930 | { | 930 | { |
931 | const struct firmware *fw_entry = 0; | 931 | const struct firmware *fw_entry = NULL; |
932 | void *fw_ptr; | 932 | void *fw_ptr; |
933 | unsigned int pipe; | 933 | unsigned int pipe; |
934 | int ret; | 934 | int ret; |
@@ -1024,7 +1024,7 @@ static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) | |||
1024 | 1024 | ||
1025 | int pvr2_upload_firmware2(struct pvr2_hdw *hdw) | 1025 | int pvr2_upload_firmware2(struct pvr2_hdw *hdw) |
1026 | { | 1026 | { |
1027 | const struct firmware *fw_entry = 0; | 1027 | const struct firmware *fw_entry = NULL; |
1028 | void *fw_ptr; | 1028 | void *fw_ptr; |
1029 | unsigned int pipe, fw_len, fw_done; | 1029 | unsigned int pipe, fw_len, fw_done; |
1030 | int actual_length; | 1030 | int actual_length; |
@@ -1739,7 +1739,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | |||
1739 | sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) { | 1739 | sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) { |
1740 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 1740 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
1741 | "Bogus device type of %u reported",hdw_type); | 1741 | "Bogus device type of %u reported",hdw_type); |
1742 | return 0; | 1742 | return NULL; |
1743 | } | 1743 | } |
1744 | 1744 | ||
1745 | hdw = kmalloc(sizeof(*hdw),GFP_KERNEL); | 1745 | hdw = kmalloc(sizeof(*hdw),GFP_KERNEL); |
@@ -1920,7 +1920,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | |||
1920 | if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); | 1920 | if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); |
1921 | kfree(hdw); | 1921 | kfree(hdw); |
1922 | } | 1922 | } |
1923 | return 0; | 1923 | return NULL; |
1924 | } | 1924 | } |
1925 | 1925 | ||
1926 | 1926 | ||
@@ -1933,25 +1933,25 @@ static void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw) | |||
1933 | if (hdw->ctl_read_urb) { | 1933 | if (hdw->ctl_read_urb) { |
1934 | usb_kill_urb(hdw->ctl_read_urb); | 1934 | usb_kill_urb(hdw->ctl_read_urb); |
1935 | usb_free_urb(hdw->ctl_read_urb); | 1935 | usb_free_urb(hdw->ctl_read_urb); |
1936 | hdw->ctl_read_urb = 0; | 1936 | hdw->ctl_read_urb = NULL; |
1937 | } | 1937 | } |
1938 | if (hdw->ctl_write_urb) { | 1938 | if (hdw->ctl_write_urb) { |
1939 | usb_kill_urb(hdw->ctl_write_urb); | 1939 | usb_kill_urb(hdw->ctl_write_urb); |
1940 | usb_free_urb(hdw->ctl_write_urb); | 1940 | usb_free_urb(hdw->ctl_write_urb); |
1941 | hdw->ctl_write_urb = 0; | 1941 | hdw->ctl_write_urb = NULL; |
1942 | } | 1942 | } |
1943 | if (hdw->ctl_read_buffer) { | 1943 | if (hdw->ctl_read_buffer) { |
1944 | kfree(hdw->ctl_read_buffer); | 1944 | kfree(hdw->ctl_read_buffer); |
1945 | hdw->ctl_read_buffer = 0; | 1945 | hdw->ctl_read_buffer = NULL; |
1946 | } | 1946 | } |
1947 | if (hdw->ctl_write_buffer) { | 1947 | if (hdw->ctl_write_buffer) { |
1948 | kfree(hdw->ctl_write_buffer); | 1948 | kfree(hdw->ctl_write_buffer); |
1949 | hdw->ctl_write_buffer = 0; | 1949 | hdw->ctl_write_buffer = NULL; |
1950 | } | 1950 | } |
1951 | pvr2_hdw_render_useless_unlocked(hdw); | 1951 | pvr2_hdw_render_useless_unlocked(hdw); |
1952 | hdw->flag_disconnected = !0; | 1952 | hdw->flag_disconnected = !0; |
1953 | hdw->usb_dev = 0; | 1953 | hdw->usb_dev = NULL; |
1954 | hdw->usb_intf = 0; | 1954 | hdw->usb_intf = NULL; |
1955 | } | 1955 | } |
1956 | 1956 | ||
1957 | 1957 | ||
@@ -1961,11 +1961,11 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw) | |||
1961 | pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw); | 1961 | pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw); |
1962 | if (hdw->fw_buffer) { | 1962 | if (hdw->fw_buffer) { |
1963 | kfree(hdw->fw_buffer); | 1963 | kfree(hdw->fw_buffer); |
1964 | hdw->fw_buffer = 0; | 1964 | hdw->fw_buffer = NULL; |
1965 | } | 1965 | } |
1966 | if (hdw->vid_stream) { | 1966 | if (hdw->vid_stream) { |
1967 | pvr2_stream_destroy(hdw->vid_stream); | 1967 | pvr2_stream_destroy(hdw->vid_stream); |
1968 | hdw->vid_stream = 0; | 1968 | hdw->vid_stream = NULL; |
1969 | } | 1969 | } |
1970 | if (hdw->audio_stat) { | 1970 | if (hdw->audio_stat) { |
1971 | hdw->audio_stat->detach(hdw->audio_stat->ctxt); | 1971 | hdw->audio_stat->detach(hdw->audio_stat->ctxt); |
@@ -1979,7 +1979,7 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw) | |||
1979 | if ((hdw->unit_number >= 0) && | 1979 | if ((hdw->unit_number >= 0) && |
1980 | (hdw->unit_number < PVR_NUM) && | 1980 | (hdw->unit_number < PVR_NUM) && |
1981 | (unit_pointers[hdw->unit_number] == hdw)) { | 1981 | (unit_pointers[hdw->unit_number] == hdw)) { |
1982 | unit_pointers[hdw->unit_number] = 0; | 1982 | unit_pointers[hdw->unit_number] = NULL; |
1983 | } | 1983 | } |
1984 | } while (0); up(&pvr2_unit_sem); | 1984 | } while (0); up(&pvr2_unit_sem); |
1985 | if (hdw->controls) kfree(hdw->controls); | 1985 | if (hdw->controls) kfree(hdw->controls); |
@@ -2041,12 +2041,12 @@ static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw) | |||
2041 | 2041 | ||
2042 | if (hdw->std_defs) { | 2042 | if (hdw->std_defs) { |
2043 | kfree(hdw->std_defs); | 2043 | kfree(hdw->std_defs); |
2044 | hdw->std_defs = 0; | 2044 | hdw->std_defs = NULL; |
2045 | } | 2045 | } |
2046 | hdw->std_enum_cnt = 0; | 2046 | hdw->std_enum_cnt = 0; |
2047 | if (hdw->std_enum_names) { | 2047 | if (hdw->std_enum_names) { |
2048 | kfree(hdw->std_enum_names); | 2048 | kfree(hdw->std_enum_names); |
2049 | hdw->std_enum_names = 0; | 2049 | hdw->std_enum_names = NULL; |
2050 | } | 2050 | } |
2051 | 2051 | ||
2052 | if (!std_cnt) { | 2052 | if (!std_cnt) { |
@@ -2097,7 +2097,7 @@ unsigned int pvr2_hdw_get_ctrl_count(struct pvr2_hdw *hdw) | |||
2097 | struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw, | 2097 | struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw, |
2098 | unsigned int idx) | 2098 | unsigned int idx) |
2099 | { | 2099 | { |
2100 | if (idx >= hdw->control_cnt) return 0; | 2100 | if (idx >= hdw->control_cnt) return NULL; |
2101 | return hdw->controls + idx; | 2101 | return hdw->controls + idx; |
2102 | } | 2102 | } |
2103 | 2103 | ||
@@ -2116,7 +2116,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_id(struct pvr2_hdw *hdw, | |||
2116 | i = cptr->info->internal_id; | 2116 | i = cptr->info->internal_id; |
2117 | if (i && (i == ctl_id)) return cptr; | 2117 | if (i && (i == ctl_id)) return cptr; |
2118 | } | 2118 | } |
2119 | return 0; | 2119 | return NULL; |
2120 | } | 2120 | } |
2121 | 2121 | ||
2122 | 2122 | ||
@@ -2133,7 +2133,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_v4l(struct pvr2_hdw *hdw,unsigned int ctl_id | |||
2133 | i = cptr->info->v4l_id; | 2133 | i = cptr->info->v4l_id; |
2134 | if (i && (i == ctl_id)) return cptr; | 2134 | if (i && (i == ctl_id)) return cptr; |
2135 | } | 2135 | } |
2136 | return 0; | 2136 | return NULL; |
2137 | } | 2137 | } |
2138 | 2138 | ||
2139 | 2139 | ||
@@ -2147,7 +2147,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw, | |||
2147 | int i; | 2147 | int i; |
2148 | 2148 | ||
2149 | /* This could be made a lot more efficient, but for now... */ | 2149 | /* This could be made a lot more efficient, but for now... */ |
2150 | cp2 = 0; | 2150 | cp2 = NULL; |
2151 | for (idx = 0; idx < hdw->control_cnt; idx++) { | 2151 | for (idx = 0; idx < hdw->control_cnt; idx++) { |
2152 | cptr = hdw->controls + idx; | 2152 | cptr = hdw->controls + idx; |
2153 | i = cptr->info->v4l_id; | 2153 | i = cptr->info->v4l_id; |
@@ -2157,7 +2157,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw, | |||
2157 | cp2 = cptr; | 2157 | cp2 = cptr; |
2158 | } | 2158 | } |
2159 | return cp2; | 2159 | return cp2; |
2160 | return 0; | 2160 | return NULL; |
2161 | } | 2161 | } |
2162 | 2162 | ||
2163 | 2163 | ||
@@ -2414,7 +2414,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, int enable_flag) | |||
2414 | pvr2_trace(PVR2_TRACE_FIRMWARE, | 2414 | pvr2_trace(PVR2_TRACE_FIRMWARE, |
2415 | "Cleaning up after CPU firmware fetch"); | 2415 | "Cleaning up after CPU firmware fetch"); |
2416 | kfree(hdw->fw_buffer); | 2416 | kfree(hdw->fw_buffer); |
2417 | hdw->fw_buffer = 0; | 2417 | hdw->fw_buffer = NULL; |
2418 | hdw->fw_size = 0; | 2418 | hdw->fw_size = 0; |
2419 | /* Now release the CPU. It will disconnect and | 2419 | /* Now release the CPU. It will disconnect and |
2420 | reconnect later. */ | 2420 | reconnect later. */ |
@@ -2863,7 +2863,7 @@ static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw) | |||
2863 | pvr2_trace(PVR2_TRACE_INIT,"render_useless"); | 2863 | pvr2_trace(PVR2_TRACE_INIT,"render_useless"); |
2864 | hdw->flag_ok = 0; | 2864 | hdw->flag_ok = 0; |
2865 | if (hdw->vid_stream) { | 2865 | if (hdw->vid_stream) { |
2866 | pvr2_stream_setup(hdw->vid_stream,0,0,0); | 2866 | pvr2_stream_setup(hdw->vid_stream,NULL,0,0); |
2867 | } | 2867 | } |
2868 | hdw->flag_streaming_enabled = 0; | 2868 | hdw->flag_streaming_enabled = 0; |
2869 | hdw->subsys_enabled_mask = 0; | 2869 | hdw->subsys_enabled_mask = 0; |
@@ -2882,7 +2882,7 @@ void pvr2_hdw_device_reset(struct pvr2_hdw *hdw) | |||
2882 | { | 2882 | { |
2883 | int ret; | 2883 | int ret; |
2884 | pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset..."); | 2884 | pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset..."); |
2885 | ret = usb_lock_device_for_reset(hdw->usb_dev,0); | 2885 | ret = usb_lock_device_for_reset(hdw->usb_dev,NULL); |
2886 | if (ret == 1) { | 2886 | if (ret == 1) { |
2887 | ret = usb_reset_device(hdw->usb_dev); | 2887 | ret = usb_reset_device(hdw->usb_dev); |
2888 | usb_unlock_device(hdw->usb_dev); | 2888 | usb_unlock_device(hdw->usb_dev); |
@@ -2931,7 +2931,7 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *hdw) | |||
2931 | pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset"); | 2931 | pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset"); |
2932 | hdw->flag_ok = !0; | 2932 | hdw->flag_ok = !0; |
2933 | hdw->cmd_buffer[0] = 0xdd; | 2933 | hdw->cmd_buffer[0] = 0xdd; |
2934 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); | 2934 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); |
2935 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 2935 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
2936 | return status; | 2936 | return status; |
2937 | } | 2937 | } |
@@ -2943,7 +2943,7 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw) | |||
2943 | LOCK_TAKE(hdw->ctl_lock); do { | 2943 | LOCK_TAKE(hdw->ctl_lock); do { |
2944 | pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup"); | 2944 | pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup"); |
2945 | hdw->cmd_buffer[0] = 0xde; | 2945 | hdw->cmd_buffer[0] = 0xde; |
2946 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); | 2946 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); |
2947 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 2947 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
2948 | return status; | 2948 | return status; |
2949 | } | 2949 | } |
@@ -2975,7 +2975,7 @@ static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) | |||
2975 | int status; | 2975 | int status; |
2976 | LOCK_TAKE(hdw->ctl_lock); do { | 2976 | LOCK_TAKE(hdw->ctl_lock); do { |
2977 | hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37); | 2977 | hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37); |
2978 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); | 2978 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); |
2979 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 2979 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
2980 | if (!status) { | 2980 | if (!status) { |
2981 | hdw->subsys_enabled_mask = | 2981 | 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 9f81aff2b38a..8a9933dec912 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 = { | |||
196 | static void do_log(struct pvr2_hdw *hdw) | 196 | static void do_log(struct pvr2_hdw *hdw) |
197 | { | 197 | { |
198 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()"); | 198 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()"); |
199 | pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,0); | 199 | pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,NULL); |
200 | 200 | ||
201 | } | 201 | } |
202 | 202 | ||
@@ -217,7 +217,7 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_log = { | |||
217 | void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl) | 217 | void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl) |
218 | { | 218 | { |
219 | pvr2_i2c_client_cmd(cp, | 219 | pvr2_i2c_client_cmd(cp, |
220 | (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),0); | 220 | (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),NULL); |
221 | } | 221 | } |
222 | 222 | ||
223 | 223 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index eca48c90b553..7fca47982277 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, | |||
271 | "WARNING: Disabling further access to the device" | 271 | "WARNING: Disabling further access to the device" |
272 | " to prevent other foul-ups."); | 272 | " to prevent other foul-ups."); |
273 | // This blocks all further communication with the part. | 273 | // This blocks all further communication with the part. |
274 | hdw->i2c_func[0x44] = 0; | 274 | hdw->i2c_func[0x44] = NULL; |
275 | pvr2_hdw_render_useless(hdw); | 275 | pvr2_hdw_render_useless(hdw); |
276 | goto fail; | 276 | goto fail; |
277 | } | 277 | } |
@@ -298,7 +298,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
298 | int num) | 298 | int num) |
299 | { | 299 | { |
300 | int ret = -ENOTSUPP; | 300 | int ret = -ENOTSUPP; |
301 | pvr2_i2c_func funcp = 0; | 301 | pvr2_i2c_func funcp = NULL; |
302 | struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data); | 302 | struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data); |
303 | 303 | ||
304 | if (!num) { | 304 | if (!num) { |
@@ -323,7 +323,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
323 | u16 tcnt,bcnt,offs; | 323 | u16 tcnt,bcnt,offs; |
324 | if (!msgs[0].len) { | 324 | if (!msgs[0].len) { |
325 | /* Length == 0 read. This is a probe. */ | 325 | /* Length == 0 read. This is a probe. */ |
326 | if (funcp(hdw,msgs[0].addr,0,0,0,0)) { | 326 | if (funcp(hdw,msgs[0].addr,NULL,0,NULL,0)) { |
327 | ret = -EIO; | 327 | ret = -EIO; |
328 | goto done; | 328 | goto done; |
329 | } | 329 | } |
@@ -340,7 +340,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
340 | if (bcnt > sizeof(hdw->cmd_buffer)-1) { | 340 | if (bcnt > sizeof(hdw->cmd_buffer)-1) { |
341 | bcnt = sizeof(hdw->cmd_buffer)-1; | 341 | bcnt = sizeof(hdw->cmd_buffer)-1; |
342 | } | 342 | } |
343 | if (funcp(hdw,msgs[0].addr,0,0, | 343 | if (funcp(hdw,msgs[0].addr,NULL,0, |
344 | msgs[0].buf+offs,bcnt)) { | 344 | msgs[0].buf+offs,bcnt)) { |
345 | ret = -EIO; | 345 | ret = -EIO; |
346 | goto done; | 346 | goto done; |
@@ -354,7 +354,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
354 | /* Simple write */ | 354 | /* Simple write */ |
355 | ret = 1; | 355 | ret = 1; |
356 | if (funcp(hdw,msgs[0].addr, | 356 | if (funcp(hdw,msgs[0].addr, |
357 | msgs[0].buf,msgs[0].len,0,0)) { | 357 | msgs[0].buf,msgs[0].len,NULL,0)) { |
358 | ret = -EIO; | 358 | ret = -EIO; |
359 | } | 359 | } |
360 | goto done; | 360 | goto done; |
@@ -875,7 +875,7 @@ static void do_i2c_scan(struct pvr2_hdw *hdw) | |||
875 | msg[0].addr = 0; | 875 | msg[0].addr = 0; |
876 | msg[0].flags = I2C_M_RD; | 876 | msg[0].flags = I2C_M_RD; |
877 | msg[0].len = 0; | 877 | msg[0].len = 0; |
878 | msg[0].buf = 0; | 878 | msg[0].buf = NULL; |
879 | printk("%s: i2c scan beginning\n",hdw->name); | 879 | printk("%s: i2c scan beginning\n",hdw->name); |
880 | for (i = 0; i < 128; i++) { | 880 | for (i = 0; i < 128; i++) { |
881 | msg[0].addr = i; | 881 | msg[0].addr = i; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c index c032777a977f..681f79c8064e 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) | |||
116 | (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), | 116 | (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), |
117 | (bp ? bp->id : 0), | 117 | (bp ? bp->id : 0), |
118 | (bp ? bp->status : 0), | 118 | (bp ? bp->status : 0), |
119 | (bp ? bp->stream : 0), | 119 | (bp ? bp->stream : NULL), |
120 | (bp ? bp->purb : 0), | 120 | (bp ? bp->purb : NULL), |
121 | (bp ? bp->signature : 0)); | 121 | (bp ? bp->signature : 0)); |
122 | } | 122 | } |
123 | #endif /* SANITY_CHECK_BUFFERS */ | 123 | #endif /* SANITY_CHECK_BUFFERS */ |
@@ -286,7 +286,7 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp) | |||
286 | pvr2_buffer_wipe(bp); | 286 | pvr2_buffer_wipe(bp); |
287 | pvr2_buffer_set_none(bp); | 287 | pvr2_buffer_set_none(bp); |
288 | bp->signature = 0; | 288 | bp->signature = 0; |
289 | bp->stream = 0; | 289 | bp->stream = NULL; |
290 | if (bp->purb) usb_free_urb(bp->purb); | 290 | if (bp->purb) usb_free_urb(bp->purb); |
291 | pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" | 291 | pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" |
292 | " bufferDone %p",bp); | 292 | " bufferDone %p",bp); |
@@ -341,13 +341,13 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) | |||
341 | struct pvr2_buffer *bp; | 341 | struct pvr2_buffer *bp; |
342 | bp = sp->buffers[sp->buffer_total_count - 1]; | 342 | bp = sp->buffers[sp->buffer_total_count - 1]; |
343 | /* Paranoia */ | 343 | /* Paranoia */ |
344 | sp->buffers[sp->buffer_total_count - 1] = 0; | 344 | sp->buffers[sp->buffer_total_count - 1] = NULL; |
345 | (sp->buffer_total_count)--; | 345 | (sp->buffer_total_count)--; |
346 | pvr2_buffer_done(bp); | 346 | pvr2_buffer_done(bp); |
347 | kfree(bp); | 347 | kfree(bp); |
348 | } | 348 | } |
349 | if (scnt < sp->buffer_slot_count) { | 349 | if (scnt < sp->buffer_slot_count) { |
350 | struct pvr2_buffer **nb = 0; | 350 | struct pvr2_buffer **nb = NULL; |
351 | if (scnt) { | 351 | if (scnt) { |
352 | nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); | 352 | nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); |
353 | if (!nb) return -ENOMEM; | 353 | if (!nb) return -ENOMEM; |
@@ -530,21 +530,21 @@ int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) | |||
530 | struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) | 530 | struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) |
531 | { | 531 | { |
532 | struct list_head *lp = sp->idle_list.next; | 532 | struct list_head *lp = sp->idle_list.next; |
533 | if (lp == &sp->idle_list) return 0; | 533 | if (lp == &sp->idle_list) return NULL; |
534 | return list_entry(lp,struct pvr2_buffer,list_overhead); | 534 | return list_entry(lp,struct pvr2_buffer,list_overhead); |
535 | } | 535 | } |
536 | 536 | ||
537 | struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) | 537 | struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) |
538 | { | 538 | { |
539 | struct list_head *lp = sp->ready_list.next; | 539 | struct list_head *lp = sp->ready_list.next; |
540 | if (lp == &sp->ready_list) return 0; | 540 | if (lp == &sp->ready_list) return NULL; |
541 | return list_entry(lp,struct pvr2_buffer,list_overhead); | 541 | return list_entry(lp,struct pvr2_buffer,list_overhead); |
542 | } | 542 | } |
543 | 543 | ||
544 | struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) | 544 | struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) |
545 | { | 545 | { |
546 | if (id < 0) return 0; | 546 | if (id < 0) return NULL; |
547 | if (id >= sp->buffer_total_count) return 0; | 547 | if (id >= sp->buffer_total_count) return NULL; |
548 | return sp->buffers[id]; | 548 | return sp->buffers[id]; |
549 | } | 549 | } |
550 | 550 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c index 4dce1a462f50..f7a2e225a002 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) | |||
54 | { | 54 | { |
55 | unsigned int idx; | 55 | unsigned int idx; |
56 | 56 | ||
57 | cp->stream = 0; | 57 | cp->stream = NULL; |
58 | mutex_init(&cp->mutex); | 58 | mutex_init(&cp->mutex); |
59 | 59 | ||
60 | for (idx = 0; idx < BUFFER_COUNT; idx++) { | 60 | for (idx = 0; idx < BUFFER_COUNT; idx++) { |
@@ -77,7 +77,7 @@ static void pvr2_ioread_done(struct pvr2_ioread *cp) | |||
77 | { | 77 | { |
78 | unsigned int idx; | 78 | unsigned int idx; |
79 | 79 | ||
80 | pvr2_ioread_setup(cp,0); | 80 | pvr2_ioread_setup(cp,NULL); |
81 | for (idx = 0; idx < BUFFER_COUNT; idx++) { | 81 | for (idx = 0; idx < BUFFER_COUNT; idx++) { |
82 | if (!(cp->buffer_storage[idx])) continue; | 82 | if (!(cp->buffer_storage[idx])) continue; |
83 | kfree(cp->buffer_storage[idx]); | 83 | kfree(cp->buffer_storage[idx]); |
@@ -88,12 +88,12 @@ struct pvr2_ioread *pvr2_ioread_create(void) | |||
88 | { | 88 | { |
89 | struct pvr2_ioread *cp; | 89 | struct pvr2_ioread *cp; |
90 | cp = kmalloc(sizeof(*cp),GFP_KERNEL); | 90 | cp = kmalloc(sizeof(*cp),GFP_KERNEL); |
91 | if (!cp) return 0; | 91 | if (!cp) return NULL; |
92 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp); | 92 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp); |
93 | memset(cp,0,sizeof(*cp)); | 93 | memset(cp,0,sizeof(*cp)); |
94 | if (pvr2_ioread_init(cp) < 0) { | 94 | if (pvr2_ioread_init(cp) < 0) { |
95 | kfree(cp); | 95 | kfree(cp); |
96 | return 0; | 96 | return NULL; |
97 | } | 97 | } |
98 | return cp; | 98 | return cp; |
99 | } | 99 | } |
@@ -105,7 +105,7 @@ void pvr2_ioread_destroy(struct pvr2_ioread *cp) | |||
105 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp); | 105 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp); |
106 | if (cp->sync_key_ptr) { | 106 | if (cp->sync_key_ptr) { |
107 | kfree(cp->sync_key_ptr); | 107 | kfree(cp->sync_key_ptr); |
108 | cp->sync_key_ptr = 0; | 108 | cp->sync_key_ptr = NULL; |
109 | } | 109 | } |
110 | kfree(cp); | 110 | kfree(cp); |
111 | } | 111 | } |
@@ -124,7 +124,7 @@ void pvr2_ioread_set_sync_key(struct pvr2_ioread *cp, | |||
124 | if (sync_key_len != cp->sync_key_len) { | 124 | if (sync_key_len != cp->sync_key_len) { |
125 | if (cp->sync_key_ptr) { | 125 | if (cp->sync_key_ptr) { |
126 | kfree(cp->sync_key_ptr); | 126 | kfree(cp->sync_key_ptr); |
127 | cp->sync_key_ptr = 0; | 127 | cp->sync_key_ptr = NULL; |
128 | } | 128 | } |
129 | cp->sync_key_len = 0; | 129 | cp->sync_key_len = 0; |
130 | if (sync_key_len) { | 130 | if (sync_key_len) { |
@@ -144,8 +144,8 @@ static void pvr2_ioread_stop(struct pvr2_ioread *cp) | |||
144 | pvr2_trace(PVR2_TRACE_START_STOP, | 144 | pvr2_trace(PVR2_TRACE_START_STOP, |
145 | "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp); | 145 | "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp); |
146 | pvr2_stream_kill(cp->stream); | 146 | pvr2_stream_kill(cp->stream); |
147 | cp->c_buf = 0; | 147 | cp->c_buf = NULL; |
148 | cp->c_data_ptr = 0; | 148 | cp->c_data_ptr = NULL; |
149 | cp->c_data_len = 0; | 149 | cp->c_data_len = 0; |
150 | cp->c_data_offs = 0; | 150 | cp->c_data_offs = 0; |
151 | cp->enabled = 0; | 151 | cp->enabled = 0; |
@@ -179,8 +179,8 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp) | |||
179 | } | 179 | } |
180 | } | 180 | } |
181 | cp->enabled = !0; | 181 | cp->enabled = !0; |
182 | cp->c_buf = 0; | 182 | cp->c_buf = NULL; |
183 | cp->c_data_ptr = 0; | 183 | cp->c_data_ptr = NULL; |
184 | cp->c_data_len = 0; | 184 | cp->c_data_len = 0; |
185 | cp->c_data_offs = 0; | 185 | cp->c_data_offs = 0; |
186 | cp->stream_running = 0; | 186 | cp->stream_running = 0; |
@@ -214,7 +214,7 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) | |||
214 | pvr2_ioread_stop(cp); | 214 | pvr2_ioread_stop(cp); |
215 | pvr2_stream_kill(cp->stream); | 215 | pvr2_stream_kill(cp->stream); |
216 | pvr2_stream_set_buffer_count(cp->stream,0); | 216 | pvr2_stream_set_buffer_count(cp->stream,0); |
217 | cp->stream = 0; | 217 | cp->stream = NULL; |
218 | } | 218 | } |
219 | if (sp) { | 219 | if (sp) { |
220 | pvr2_trace(PVR2_TRACE_START_STOP, | 220 | pvr2_trace(PVR2_TRACE_START_STOP, |
@@ -270,8 +270,8 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) | |||
270 | pvr2_ioread_stop(cp); | 270 | pvr2_ioread_stop(cp); |
271 | return 0; | 271 | return 0; |
272 | } | 272 | } |
273 | cp->c_buf = 0; | 273 | cp->c_buf = NULL; |
274 | cp->c_data_ptr = 0; | 274 | cp->c_data_ptr = NULL; |
275 | cp->c_data_len = 0; | 275 | cp->c_data_len = 0; |
276 | cp->c_data_offs = 0; | 276 | cp->c_data_offs = 0; |
277 | } | 277 | } |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c index b95248274ed0..8f1a5afdd34e 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); | |||
54 | MODULE_PARM_DESC(debug, "Debug trace mask"); | 54 | MODULE_PARM_DESC(debug, "Debug trace mask"); |
55 | 55 | ||
56 | #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS | 56 | #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS |
57 | static struct pvr2_sysfs_class *class_ptr = 0; | 57 | static struct pvr2_sysfs_class *class_ptr = NULL; |
58 | #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ | 58 | #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ |
59 | 59 | ||
60 | static void pvr_setup_attach(struct pvr2_context *pvr) | 60 | static void pvr_setup_attach(struct pvr2_context *pvr) |
@@ -104,10 +104,10 @@ static void pvr_disconnect(struct usb_interface *intf) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | static struct usb_driver pvr_driver = { | 106 | static struct usb_driver pvr_driver = { |
107 | name: "pvrusb2", | 107 | .name = "pvrusb2", |
108 | id_table: pvr2_device_table, | 108 | .id_table = pvr2_device_table, |
109 | probe: pvr_probe, | 109 | .probe = pvr_probe, |
110 | disconnect: pvr_disconnect | 110 | .disconnect = pvr_disconnect |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* | 113 | /* |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c index 134063693643..f95c598ff627 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, | |||
121 | if (strlen(p->name) != bufSize) continue; | 121 | if (strlen(p->name) != bufSize) continue; |
122 | if (!memcmp(bufPtr,p->name,bufSize)) return p; | 122 | if (!memcmp(bufPtr,p->name,bufSize)) return p; |
123 | } | 123 | } |
124 | return 0; | 124 | return NULL; |
125 | } | 125 | } |
126 | 126 | ||
127 | 127 | ||
@@ -289,7 +289,7 @@ static struct v4l2_standard *match_std(v4l2_std_id id) | |||
289 | return generic_standards + idx; | 289 | return generic_standards + idx; |
290 | } | 290 | } |
291 | } | 291 | } |
292 | return 0; | 292 | return NULL; |
293 | } | 293 | } |
294 | 294 | ||
295 | static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id) | 295 | 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, | |||
364 | 364 | ||
365 | pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)", | 365 | pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)", |
366 | std_cnt); | 366 | std_cnt); |
367 | if (!std_cnt) return 0; // paranoia | 367 | if (!std_cnt) return NULL; // paranoia |
368 | 368 | ||
369 | stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt, | 369 | stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt, |
370 | GFP_KERNEL); | 370 | GFP_KERNEL); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index c6e6523d74b4..6af55a8b6f05 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) | |||
504 | cip->cptr = cptr; | 504 | cip->cptr = cptr; |
505 | 505 | ||
506 | cip->chptr = sfp; | 506 | cip->chptr = sfp; |
507 | cip->item_next = 0; | 507 | cip->item_next = NULL; |
508 | if (sfp->item_last) { | 508 | if (sfp->item_last) { |
509 | sfp->item_last->item_next = cip; | 509 | sfp->item_last->item_next = cip; |
510 | } else { | 510 | } else { |
@@ -625,7 +625,7 @@ static void pvr2_sysfs_tear_down_debugifc(struct pvr2_sysfs *sfp) | |||
625 | &sfp->debugifc->attr_debuginfo); | 625 | &sfp->debugifc->attr_debuginfo); |
626 | class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd); | 626 | class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd); |
627 | kfree(sfp->debugifc); | 627 | kfree(sfp->debugifc); |
628 | sfp->debugifc = 0; | 628 | sfp->debugifc = NULL; |
629 | } | 629 | } |
630 | #endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ | 630 | #endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ |
631 | 631 | ||
@@ -678,9 +678,9 @@ static void class_dev_destroy(struct pvr2_sysfs *sfp) | |||
678 | class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number); | 678 | class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number); |
679 | class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number); | 679 | class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number); |
680 | pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); | 680 | pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); |
681 | sfp->class_dev->class_data = 0; | 681 | sfp->class_dev->class_data = NULL; |
682 | class_device_unregister(sfp->class_dev); | 682 | class_device_unregister(sfp->class_dev); |
683 | sfp->class_dev = 0; | 683 | sfp->class_dev = NULL; |
684 | } | 684 | } |
685 | 685 | ||
686 | 686 | ||
@@ -739,13 +739,13 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
739 | sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; | 739 | sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; |
740 | sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; | 740 | sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; |
741 | sfp->attr_v4l_minor_number.show = v4l_minor_number_show; | 741 | sfp->attr_v4l_minor_number.show = v4l_minor_number_show; |
742 | sfp->attr_v4l_minor_number.store = 0; | 742 | sfp->attr_v4l_minor_number.store = NULL; |
743 | class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number); | 743 | class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number); |
744 | sfp->attr_unit_number.attr.owner = THIS_MODULE; | 744 | sfp->attr_unit_number.attr.owner = THIS_MODULE; |
745 | sfp->attr_unit_number.attr.name = "unit_number"; | 745 | sfp->attr_unit_number.attr.name = "unit_number"; |
746 | sfp->attr_unit_number.attr.mode = S_IRUGO; | 746 | sfp->attr_unit_number.attr.mode = S_IRUGO; |
747 | sfp->attr_unit_number.show = unit_number_show; | 747 | sfp->attr_unit_number.show = unit_number_show; |
748 | sfp->attr_unit_number.store = 0; | 748 | sfp->attr_unit_number.store = NULL; |
749 | class_device_create_file(sfp->class_dev,&sfp->attr_unit_number); | 749 | class_device_create_file(sfp->class_dev,&sfp->attr_unit_number); |
750 | 750 | ||
751 | pvr2_sysfs_add_controls(sfp); | 751 | pvr2_sysfs_add_controls(sfp); |
@@ -806,7 +806,7 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) | |||
806 | pvr2_sysfs_trace( | 806 | pvr2_sysfs_trace( |
807 | "Registration failed for pvr2_sysfs_class id=%p",clp); | 807 | "Registration failed for pvr2_sysfs_class id=%p",clp); |
808 | kfree(clp); | 808 | kfree(clp); |
809 | clp = 0; | 809 | clp = NULL; |
810 | } | 810 | } |
811 | return clp; | 811 | return clp; |
812 | } | 812 | } |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-tuner.c b/drivers/media/video/pvrusb2/pvrusb2-tuner.c index f4aba8144ce0..af9f246f8d3f 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) | |||
69 | 69 | ||
70 | static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt) | 70 | static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt) |
71 | { | 71 | { |
72 | ctxt->client->handler = 0; | 72 | ctxt->client->handler = NULL; |
73 | kfree(ctxt); | 73 | kfree(ctxt); |
74 | } | 74 | } |
75 | 75 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index b12c2a7f1359..0caf70b8c0de 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) | |||
760 | hdw = fhp->channel.mc_head->hdw; | 760 | hdw = fhp->channel.mc_head->hdw; |
761 | pvr2_hdw_set_streaming(hdw,0); | 761 | pvr2_hdw_set_streaming(hdw,0); |
762 | sp = pvr2_ioread_get_stream(fhp->rhp); | 762 | sp = pvr2_ioread_get_stream(fhp->rhp); |
763 | if (sp) pvr2_stream_set_callback(sp,0,0); | 763 | if (sp) pvr2_stream_set_callback(sp,NULL,NULL); |
764 | pvr2_ioread_destroy(fhp->rhp); | 764 | pvr2_ioread_destroy(fhp->rhp); |
765 | fhp->rhp = 0; | 765 | fhp->rhp = NULL; |
766 | } | 766 | } |
767 | v4l2_prio_close(&vp->prio, &fhp->prio); | 767 | v4l2_prio_close(&vp->prio, &fhp->prio); |
768 | file->private_data = NULL; | 768 | file->private_data = NULL; |
@@ -778,9 +778,9 @@ static int pvr2_v4l2_release(struct inode *inode, struct file *file) | |||
778 | } else { | 778 | } else { |
779 | vp->vfirst = fhp->vnext; | 779 | vp->vfirst = fhp->vnext; |
780 | } | 780 | } |
781 | fhp->vnext = 0; | 781 | fhp->vnext = NULL; |
782 | fhp->vprev = 0; | 782 | fhp->vprev = NULL; |
783 | fhp->vhead = 0; | 783 | fhp->vhead = NULL; |
784 | pvr2_channel_done(&fhp->channel); | 784 | pvr2_channel_done(&fhp->channel); |
785 | pvr2_trace(PVR2_TRACE_STRUCT, | 785 | pvr2_trace(PVR2_TRACE_STRUCT, |
786 | "Destroying pvr_v4l2_fh id=%p",fhp); | 786 | "Destroying pvr_v4l2_fh id=%p",fhp); |
@@ -795,7 +795,7 @@ static int pvr2_v4l2_release(struct inode *inode, struct file *file) | |||
795 | 795 | ||
796 | static int pvr2_v4l2_open(struct inode *inode, struct file *file) | 796 | static int pvr2_v4l2_open(struct inode *inode, struct file *file) |
797 | { | 797 | { |
798 | struct pvr2_v4l2_dev *dip = 0; /* Our own context pointer */ | 798 | struct pvr2_v4l2_dev *dip = NULL; /* Our own context pointer */ |
799 | struct pvr2_v4l2_fh *fhp; | 799 | struct pvr2_v4l2_fh *fhp; |
800 | struct pvr2_v4l2 *vp; | 800 | struct pvr2_v4l2 *vp; |
801 | struct pvr2_hdw *hdw; | 801 | struct pvr2_hdw *hdw; |
@@ -853,7 +853,7 @@ static int pvr2_v4l2_open(struct inode *inode, struct file *file) | |||
853 | pvr2_context_enter(vp->channel.mc_head); do { | 853 | pvr2_context_enter(vp->channel.mc_head); do { |
854 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); | 854 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); |
855 | pvr2_channel_init(&fhp->channel,vp->channel.mc_head); | 855 | pvr2_channel_init(&fhp->channel,vp->channel.mc_head); |
856 | fhp->vnext = 0; | 856 | fhp->vnext = NULL; |
857 | fhp->vprev = vp->vlast; | 857 | fhp->vprev = vp->vlast; |
858 | if (vp->vlast) { | 858 | if (vp->vlast) { |
859 | vp->vlast->vnext = fhp; | 859 | vp->vlast->vnext = fhp; |
@@ -896,7 +896,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) | |||
896 | 896 | ||
897 | fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream); | 897 | fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream); |
898 | if (!fh->rhp) { | 898 | if (!fh->rhp) { |
899 | pvr2_channel_claim_stream(&fh->channel,0); | 899 | pvr2_channel_claim_stream(&fh->channel,NULL); |
900 | return -ENOMEM; | 900 | return -ENOMEM; |
901 | } | 901 | } |
902 | 902 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c index e4ec7f25194c..05f2cddeb47b 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[] = { | |||
126 | 126 | ||
127 | static void decoder_detach(struct pvr2_v4l_decoder *ctxt) | 127 | static void decoder_detach(struct pvr2_v4l_decoder *ctxt) |
128 | { | 128 | { |
129 | ctxt->client->handler = 0; | 129 | ctxt->client->handler = NULL; |
130 | ctxt->hdw->decoder_ctrl = 0; | 130 | ctxt->hdw->decoder_ctrl = NULL; |
131 | kfree(ctxt); | 131 | kfree(ctxt); |
132 | } | 132 | } |
133 | 133 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c index fcad346e3955..2413e5198e16 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, | |||
89 | 89 | ||
90 | static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt) | 90 | static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt) |
91 | { | 91 | { |
92 | ctxt->client->handler = 0; | 92 | ctxt->client->handler = NULL; |
93 | kfree(ctxt); | 93 | kfree(ctxt); |
94 | } | 94 | } |
95 | 95 | ||