aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-ioread.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-06-30 10:35:28 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-30 14:59:50 -0400
commita0fd1cb171e8b17339a9a18ae7cf09c50022010f (patch)
treefdd003ed9f8fe86d20d77fa9bb8da5e13954d494 /drivers/media/video/pvrusb2/pvrusb2-ioread.c
parent07e337eeab3660559cbe1fee6907d1092037aea7 (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/pvrusb2-ioread.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ioread.c26
1 files changed, 13 insertions, 13 deletions
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 }