diff options
author | Andy Walls <awalls@radix.net> | 2009-04-15 19:45:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:44 -0400 |
commit | 21a278b85d3c6b8064af0c03aec3205e28aad3b7 (patch) | |
tree | efa0ee9cdfc303b03faf5b080b7f5721cf13c765 /drivers/media/video/cx18/cx18-streams.h | |
parent | 40c5520f55924ba87090d0d93222baad74202559 (diff) |
V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commands
Simplify the way outgoing work handler gets scheduled to send empty buffers
back to the firmware for use. Also reduced the memory required for scheduling
this outgoing work, by using a single, per stream work object.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-streams.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-streams.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.h b/drivers/media/video/cx18/cx18-streams.h index 1fdcfffb07ed..1afc3fd9d822 100644 --- a/drivers/media/video/cx18/cx18-streams.h +++ b/drivers/media/video/cx18/cx18-streams.h | |||
@@ -29,9 +29,20 @@ int cx18_streams_register(struct cx18 *cx); | |||
29 | void cx18_streams_cleanup(struct cx18 *cx, int unregister); | 29 | void cx18_streams_cleanup(struct cx18 *cx, int unregister); |
30 | 30 | ||
31 | /* Related to submission of buffers to firmware */ | 31 | /* Related to submission of buffers to firmware */ |
32 | void cx18_stream_load_fw_queue(struct cx18_stream *s); | 32 | static inline void cx18_stream_load_fw_queue(struct cx18_stream *s) |
33 | struct cx18_queue *cx18_stream_put_buf_fw(struct cx18_stream *s, | 33 | { |
34 | struct cx18_buffer *buf); | 34 | struct cx18 *cx = s->cx; |
35 | queue_work(cx->out_work_queue, &s->out_work_order); | ||
36 | } | ||
37 | |||
38 | static inline void cx18_stream_put_buf_fw(struct cx18_stream *s, | ||
39 | struct cx18_buffer *buf) | ||
40 | { | ||
41 | /* Put buf on q_free; the out work handler will move buf(s) to q_busy */ | ||
42 | cx18_enqueue(s, buf, &s->q_free); | ||
43 | cx18_stream_load_fw_queue(s); | ||
44 | } | ||
45 | |||
35 | void cx18_out_work_handler(struct work_struct *work); | 46 | void cx18_out_work_handler(struct work_struct *work); |
36 | 47 | ||
37 | /* Capture related */ | 48 | /* Capture related */ |