diff options
author | Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> | 2008-04-22 13:46:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:51 -0400 |
commit | 7daa4a8897e79911f524ddac065adea05c7e9b16 (patch) | |
tree | b98c96df4282870130fcc712dd3832871fb90dc1 /drivers/media/video/ivtv | |
parent | b2cb200f0d0d5e801b47635554519f6e1b64e847 (diff) |
V4L/DVB (7378): cleanup variable initialization
flags used for spinlocks don't need to be initialized, except where the
compiler has no way to see, that the spin_unlock_irqrestore is only called
if the spin_lock_irqsave has been called before. Local variable
initialization doesn't have to be protected.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-queue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/video/ivtv/ivtv-queue.c index 39a216713244..3e1deec67a5e 100644 --- a/drivers/media/video/ivtv/ivtv-queue.c +++ b/drivers/media/video/ivtv/ivtv-queue.c | |||
@@ -51,7 +51,7 @@ void ivtv_queue_init(struct ivtv_queue *q) | |||
51 | 51 | ||
52 | void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_queue *q) | 52 | void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_queue *q) |
53 | { | 53 | { |
54 | unsigned long flags = 0; | 54 | unsigned long flags; |
55 | 55 | ||
56 | /* clear the buffer if it is going to be enqueued to the free queue */ | 56 | /* clear the buffer if it is going to be enqueued to the free queue */ |
57 | if (q == &s->q_free) { | 57 | if (q == &s->q_free) { |
@@ -71,7 +71,7 @@ void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_qu | |||
71 | struct ivtv_buffer *ivtv_dequeue(struct ivtv_stream *s, struct ivtv_queue *q) | 71 | struct ivtv_buffer *ivtv_dequeue(struct ivtv_stream *s, struct ivtv_queue *q) |
72 | { | 72 | { |
73 | struct ivtv_buffer *buf = NULL; | 73 | struct ivtv_buffer *buf = NULL; |
74 | unsigned long flags = 0; | 74 | unsigned long flags; |
75 | 75 | ||
76 | spin_lock_irqsave(&s->qlock, flags); | 76 | spin_lock_irqsave(&s->qlock, flags); |
77 | if (!list_empty(&q->list)) { | 77 | if (!list_empty(&q->list)) { |