summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-03-14 09:58:10 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-03-14 09:58:10 +0000
commit5d47a3af555cfacf69b0382b1f030635b78fcaac (patch)
tree62b22baef9bfc50d9281d8fb86fd1e7094baa09d /linux/drivers/media/video
parentf9e22df39dec840bd92871337b918bd5609a28d6 (diff)
downloadmediapointer-dvb-s2-5d47a3af555cfacf69b0382b1f030635b78fcaac.tar.gz
mediapointer-dvb-s2-5d47a3af555cfacf69b0382b1f030635b78fcaac.tar.bz2
cleanup variable initialization
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> 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 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-queue.c4
-rw-r--r--linux/drivers/media/video/videobuf-core.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-queue.c b/linux/drivers/media/video/ivtv/ivtv-queue.c
index 39a216713..3e1deec67 100644
--- a/linux/drivers/media/video/ivtv/ivtv-queue.c
+++ b/linux/drivers/media/video/ivtv/ivtv-queue.c
@@ -51,7 +51,7 @@ void ivtv_queue_init(struct ivtv_queue *q)
void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_queue *q)
{
- unsigned long flags = 0;
+ unsigned long flags;
/* clear the buffer if it is going to be enqueued to the free queue */
if (q == &s->q_free) {
@@ -71,7 +71,7 @@ void ivtv_enqueue(struct ivtv_stream *s, struct ivtv_buffer *buf, struct ivtv_qu
struct ivtv_buffer *ivtv_dequeue(struct ivtv_stream *s, struct ivtv_queue *q)
{
struct ivtv_buffer *buf = NULL;
- unsigned long flags = 0;
+ unsigned long flags;
spin_lock_irqsave(&s->qlock, flags);
if (!list_empty(&q->list)) {
diff --git a/linux/drivers/media/video/videobuf-core.c b/linux/drivers/media/video/videobuf-core.c
index ebe2d2a65..164963aa2 100644
--- a/linux/drivers/media/video/videobuf-core.c
+++ b/linux/drivers/media/video/videobuf-core.c
@@ -743,14 +743,13 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
{
enum v4l2_field field;
unsigned long flags = 0;
- unsigned size, nbufs;
+ unsigned size = 0, nbufs = 1;
int retval;
MAGIC_CHECK(q->int_ops->magic, MAGIC_QTYPE_OPS);
mutex_lock(&q->vb_lock);
- nbufs = 1; size = 0;
q->ops->buf_setup(q, &nbufs, &size);
if (NULL == q->read_buf &&