diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-10-16 20:42:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 16:30:40 -0400 |
commit | 11fbedd33287416a5efdc32c38e33f410bb1e942 (patch) | |
tree | 7268fc02d2a2464682130f065cf28fc1c8616a1b /drivers/media | |
parent | ca341e4d1b07ac9077b448c623ec256c89a2e080 (diff) |
V4L/DVB (9273): MFE: videobuf-dvb.c checkpatch cleanup as part of MFE merge
MFE: videobuf-dvb.c checkpatch cleanup as part of MFE merge
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/videobuf-dvb.c | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/drivers/media/video/videobuf-dvb.c b/drivers/media/video/videobuf-dvb.c index 36b1e67ac330..adf7674b4a02 100644 --- a/drivers/media/video/videobuf-dvb.c +++ b/drivers/media/video/videobuf-dvb.c | |||
@@ -126,7 +126,6 @@ static int videobuf_dvb_stop_feed(struct dvb_demux_feed *feed) | |||
126 | mutex_lock(&dvb->lock); | 126 | mutex_lock(&dvb->lock); |
127 | dvb->nfeeds--; | 127 | dvb->nfeeds--; |
128 | if (0 == dvb->nfeeds && NULL != dvb->thread) { | 128 | if (0 == dvb->nfeeds && NULL != dvb->thread) { |
129 | // FIXME: cx8802_cancel_buffers(dev); | ||
130 | err = kthread_stop(dvb->thread); | 129 | err = kthread_stop(dvb->thread); |
131 | dvb->thread = NULL; | 130 | dvb->thread = NULL; |
132 | } | 131 | } |
@@ -154,7 +153,8 @@ int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, | |||
154 | } | 153 | } |
155 | 154 | ||
156 | /* Bring up the adapter */ | 155 | /* Bring up the adapter */ |
157 | res = videobuf_dvb_register_adapter(f, module, adapter_priv, device, fe->dvb.name, adapter_nr, mfe_shared); | 156 | res = videobuf_dvb_register_adapter(f, module, adapter_priv, device, |
157 | fe->dvb.name, adapter_nr, mfe_shared); | ||
158 | if (res < 0) { | 158 | if (res < 0) { |
159 | printk(KERN_WARNING "videobuf_dvb_register_adapter failed (errno = %d)\n", res); | 159 | printk(KERN_WARNING "videobuf_dvb_register_adapter failed (errno = %d)\n", res); |
160 | return res; | 160 | return res; |
@@ -179,6 +179,7 @@ err: | |||
179 | videobuf_dvb_unregister_bus(f); | 179 | videobuf_dvb_unregister_bus(f); |
180 | return res; | 180 | return res; |
181 | } | 181 | } |
182 | EXPORT_SYMBOL(videobuf_dvb_register_bus); | ||
182 | 183 | ||
183 | int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, | 184 | int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, |
184 | struct module *module, | 185 | struct module *module, |
@@ -193,7 +194,8 @@ int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, | |||
193 | mutex_init(&fe->lock); | 194 | mutex_init(&fe->lock); |
194 | 195 | ||
195 | /* register adapter */ | 196 | /* register adapter */ |
196 | result = dvb_register_adapter(&fe->adapter, adapter_name, module, device, adapter_nr); | 197 | result = dvb_register_adapter(&fe->adapter, adapter_name, module, |
198 | device, adapter_nr); | ||
197 | if (result < 0) { | 199 | if (result < 0) { |
198 | printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n", | 200 | printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n", |
199 | adapter_name, result); | 201 | adapter_name, result); |
@@ -204,7 +206,8 @@ int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe, | |||
204 | return result; | 206 | return result; |
205 | } | 207 | } |
206 | 208 | ||
207 | int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, struct videobuf_dvb *dvb) | 209 | int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, |
210 | struct videobuf_dvb *dvb) | ||
208 | { | 211 | { |
209 | int result; | 212 | int result; |
210 | 213 | ||
@@ -299,15 +302,18 @@ void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f) | |||
299 | mutex_lock(&f->lock); | 302 | mutex_lock(&f->lock); |
300 | list_for_each_safe(list, q, &f->felist) { | 303 | list_for_each_safe(list, q, &f->felist) { |
301 | fe = list_entry(list, struct videobuf_dvb_frontend, felist); | 304 | fe = list_entry(list, struct videobuf_dvb_frontend, felist); |
302 | if(fe->dvb.net.dvbdev) { | 305 | if (fe->dvb.net.dvbdev) { |
303 | dvb_net_release(&fe->dvb.net); | 306 | dvb_net_release(&fe->dvb.net); |
304 | fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, &fe->dvb.fe_mem); | 307 | fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, |
305 | fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, &fe->dvb.fe_hw); | 308 | &fe->dvb.fe_mem); |
309 | fe->dvb.demux.dmx.remove_frontend(&fe->dvb.demux.dmx, | ||
310 | &fe->dvb.fe_hw); | ||
306 | dvb_dmxdev_release(&fe->dvb.dmxdev); | 311 | dvb_dmxdev_release(&fe->dvb.dmxdev); |
307 | dvb_dmx_release(&fe->dvb.demux); | 312 | dvb_dmx_release(&fe->dvb.demux); |
308 | dvb_unregister_frontend(fe->dvb.frontend); | 313 | dvb_unregister_frontend(fe->dvb.frontend); |
309 | } | 314 | } |
310 | if(fe->dvb.frontend) /* always allocated, may have been reset */ | 315 | if (fe->dvb.frontend) |
316 | /* always allocated, may have been reset */ | ||
311 | dvb_frontend_detach(fe->dvb.frontend); | 317 | dvb_frontend_detach(fe->dvb.frontend); |
312 | list_del(list); | 318 | list_del(list); |
313 | kfree(fe); | 319 | kfree(fe); |
@@ -316,8 +322,10 @@ void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f) | |||
316 | 322 | ||
317 | dvb_unregister_adapter(&f->adapter); | 323 | dvb_unregister_adapter(&f->adapter); |
318 | } | 324 | } |
325 | EXPORT_SYMBOL(videobuf_dvb_unregister_bus); | ||
319 | 326 | ||
320 | struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id) | 327 | struct videobuf_dvb_frontend *videobuf_dvb_get_frontend( |
328 | struct videobuf_dvb_frontends *f, int id) | ||
321 | { | 329 | { |
322 | struct list_head *list, *q; | 330 | struct list_head *list, *q; |
323 | struct videobuf_dvb_frontend *fe, *ret = NULL; | 331 | struct videobuf_dvb_frontend *fe, *ret = NULL; |
@@ -336,8 +344,10 @@ struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_fro | |||
336 | 344 | ||
337 | return ret; | 345 | return ret; |
338 | } | 346 | } |
347 | EXPORT_SYMBOL(videobuf_dvb_get_frontend); | ||
339 | 348 | ||
340 | int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p) | 349 | int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, |
350 | struct dvb_frontend *p) | ||
341 | { | 351 | { |
342 | struct list_head *list, *q; | 352 | struct list_head *list, *q; |
343 | struct videobuf_dvb_frontend *fe = NULL; | 353 | struct videobuf_dvb_frontend *fe = NULL; |
@@ -357,12 +367,14 @@ int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_fron | |||
357 | 367 | ||
358 | return ret; | 368 | return ret; |
359 | } | 369 | } |
370 | EXPORT_SYMBOL(videobuf_dvb_find_frontend); | ||
360 | 371 | ||
361 | struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id) | 372 | struct videobuf_dvb_frontend *videobuf_dvb_alloc_frontend( |
373 | struct videobuf_dvb_frontends *f, int id) | ||
362 | { | 374 | { |
363 | struct videobuf_dvb_frontend *fe; | 375 | struct videobuf_dvb_frontend *fe; |
364 | 376 | ||
365 | fe = kzalloc(sizeof(struct videobuf_dvb_frontend),GFP_KERNEL); | 377 | fe = kzalloc(sizeof(struct videobuf_dvb_frontend), GFP_KERNEL); |
366 | if (fe == NULL) | 378 | if (fe == NULL) |
367 | goto fail_alloc; | 379 | goto fail_alloc; |
368 | 380 | ||
@@ -370,18 +382,13 @@ struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_f | |||
370 | mutex_init(&fe->dvb.lock); | 382 | mutex_init(&fe->dvb.lock); |
371 | 383 | ||
372 | mutex_lock(&f->lock); | 384 | mutex_lock(&f->lock); |
373 | list_add_tail(&fe->felist,&f->felist); | 385 | list_add_tail(&fe->felist, &f->felist); |
374 | mutex_unlock(&f->lock); | 386 | mutex_unlock(&f->lock); |
375 | 387 | ||
376 | fail_alloc: | 388 | fail_alloc: |
377 | return fe; | 389 | return fe; |
378 | } | 390 | } |
379 | |||
380 | EXPORT_SYMBOL(videobuf_dvb_register_bus); | ||
381 | EXPORT_SYMBOL(videobuf_dvb_unregister_bus); | ||
382 | EXPORT_SYMBOL(videobuf_dvb_alloc_frontend); | 391 | EXPORT_SYMBOL(videobuf_dvb_alloc_frontend); |
383 | EXPORT_SYMBOL(videobuf_dvb_get_frontend); | ||
384 | EXPORT_SYMBOL(videobuf_dvb_find_frontend); | ||
385 | 392 | ||
386 | /* ------------------------------------------------------------------ */ | 393 | /* ------------------------------------------------------------------ */ |
387 | /* | 394 | /* |