]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/ivtv/ivtv-queue.c
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / drivers / media / video / ivtv / ivtv-queue.c
index 39a216713244eecd6481d75d307e0ec38f9d74b1..71bd13e22e2ee20a5f6d27c2a4bceda494fd6d61 100644 (file)
@@ -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)) {
@@ -193,7 +193,7 @@ void ivtv_flush_queues(struct ivtv_stream *s)
 int ivtv_stream_alloc(struct ivtv_stream *s)
 {
        struct ivtv *itv = s->itv;
-       int SGsize = sizeof(struct ivtv_sg_element) * s->buffers;
+       int SGsize = sizeof(struct ivtv_sg_host_element) * s->buffers;
        int i;
 
        if (s->buffers == 0)
@@ -203,14 +203,14 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
                s->dma != PCI_DMA_NONE ? "DMA " : "",
                s->name, s->buffers, s->buf_size, s->buffers * s->buf_size / 1024);
 
-       s->sg_pending = kzalloc(SGsize, GFP_KERNEL);
+       s->sg_pending = kzalloc(SGsize, GFP_KERNEL|__GFP_NOWARN);
        if (s->sg_pending == NULL) {
                IVTV_ERR("Could not allocate sg_pending for %s stream\n", s->name);
                return -ENOMEM;
        }
        s->sg_pending_size = 0;
 
-       s->sg_processing = kzalloc(SGsize, GFP_KERNEL);
+       s->sg_processing = kzalloc(SGsize, GFP_KERNEL|__GFP_NOWARN);
        if (s->sg_processing == NULL) {
                IVTV_ERR("Could not allocate sg_processing for %s stream\n", s->name);
                kfree(s->sg_pending);
@@ -219,7 +219,8 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
        }
        s->sg_processing_size = 0;
 
-       s->sg_dma = kzalloc(sizeof(struct ivtv_sg_element), GFP_KERNEL);
+       s->sg_dma = kzalloc(sizeof(struct ivtv_sg_element),
+                                       GFP_KERNEL|__GFP_NOWARN);
        if (s->sg_dma == NULL) {
                IVTV_ERR("Could not allocate sg_dma for %s stream\n", s->name);
                kfree(s->sg_pending);
@@ -235,11 +236,12 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
 
        /* allocate stream buffers. Initially all buffers are in q_free. */
        for (i = 0; i < s->buffers; i++) {
-               struct ivtv_buffer *buf = kzalloc(sizeof(struct ivtv_buffer), GFP_KERNEL);
+               struct ivtv_buffer *buf = kzalloc(sizeof(struct ivtv_buffer),
+                                               GFP_KERNEL|__GFP_NOWARN);
 
                if (buf == NULL)
                        break;
-               buf->buf = kmalloc(s->buf_size + 256, GFP_KERNEL);
+               buf->buf = kmalloc(s->buf_size + 256, GFP_KERNEL|__GFP_NOWARN);
                if (buf->buf == NULL) {
                        kfree(buf);
                        break;