Commit 5ab83390 authored by Gerd Knorr's avatar Gerd Knorr Committed by Linus Torvalds

[PATCH] v4l: videobuf whitespace cleanup

The patch just removes all trailing whitespaces, there are no actual code
changes.  I've a script to remove them from my sources now, that should kill
those no-op whitespace changes in my patches after merging this initial
cleanup.
Signed-off-by: default avatarGerd Knorr <kraxel@bytesex.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0d175a40
/* /*
* $Id: video-buf.c,v 1.12 2004/10/11 14:53:13 kraxel Exp $ * $Id: video-buf.c,v 1.13 2004/10/13 10:39:00 kraxel Exp $
* *
* generic helper functions for video4linux capture buffers, to handle * generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it. * memory management and PCI DMA. Right now bttv + saa7134 use it.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* into PAGE_SIZE chunks). They also assume the driver does not need * into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data (thus it is probably not useful for USB 1.1 * to touch the video data (thus it is probably not useful for USB 1.1
* as data often must be uncompressed by the drivers). * as data often must be uncompressed by the drivers).
* *
* (c) 2001-2004 Gerd Knorr <kraxel@bytesex.org> [SUSE Labs] * (c) 2001-2004 Gerd Knorr <kraxel@bytesex.org> [SUSE Labs]
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -66,7 +66,7 @@ videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages) ...@@ -66,7 +66,7 @@ videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages)
sglist[i].length = PAGE_SIZE; sglist[i].length = PAGE_SIZE;
} }
return sglist; return sglist;
err: err:
kfree(sglist); kfree(sglist);
return NULL; return NULL;
...@@ -193,7 +193,7 @@ int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma) ...@@ -193,7 +193,7 @@ int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma)
{ {
MAGIC_CHECK(dma->magic,MAGIC_DMABUF); MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
BUG_ON(0 == dma->nr_pages); BUG_ON(0 == dma->nr_pages);
if (dma->pages) { if (dma->pages) {
dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages, dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages,
dma->offset); dma->offset);
...@@ -289,7 +289,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr) ...@@ -289,7 +289,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr)
{ {
int retval = 0; int retval = 0;
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
MAGIC_CHECK(vb->magic,MAGIC_BUFFER); MAGIC_CHECK(vb->magic,MAGIC_BUFFER);
add_wait_queue(&vb->done, &wait); add_wait_queue(&vb->done, &wait);
while (vb->state == STATE_ACTIVE || vb->state == STATE_QUEUED) { while (vb->state == STATE_ACTIVE || vb->state == STATE_QUEUED) {
...@@ -355,7 +355,7 @@ videobuf_iolock(struct pci_dev *pci, struct videobuf_buffer *vb, ...@@ -355,7 +355,7 @@ videobuf_iolock(struct pci_dev *pci, struct videobuf_buffer *vb,
err = videobuf_dma_pci_map(pci,&vb->dma); err = videobuf_dma_pci_map(pci,&vb->dma);
if (0 != err) if (0 != err)
return err; return err;
return 0; return 0;
} }
...@@ -383,11 +383,11 @@ videobuf_queue_init(struct videobuf_queue *q, ...@@ -383,11 +383,11 @@ videobuf_queue_init(struct videobuf_queue *q,
INIT_LIST_HEAD(&q->stream); INIT_LIST_HEAD(&q->stream);
} }
int int
videobuf_queue_is_busy(struct videobuf_queue *q) videobuf_queue_is_busy(struct videobuf_queue *q)
{ {
int i; int i;
if (q->streaming) { if (q->streaming) {
dprintk(1,"busy: streaming active\n"); dprintk(1,"busy: streaming active\n");
return 1; return 1;
...@@ -636,7 +636,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q, ...@@ -636,7 +636,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q,
retval = q->ops->buf_prepare(priv,buf,field); retval = q->ops->buf_prepare(priv,buf,field);
if (0 != retval) if (0 != retval)
goto done; goto done;
list_add_tail(&buf->stream,&q->stream); list_add_tail(&buf->stream,&q->stream);
if (q->streaming) { if (q->streaming) {
spin_lock_irqsave(q->irqlock,flags); spin_lock_irqsave(q->irqlock,flags);
...@@ -644,7 +644,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q, ...@@ -644,7 +644,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q,
spin_unlock_irqrestore(q->irqlock,flags); spin_unlock_irqrestore(q->irqlock,flags);
} }
retval = 0; retval = 0;
done: done:
up(&q->lock); up(&q->lock);
return retval; return retval;
...@@ -656,7 +656,7 @@ videobuf_dqbuf(void *priv, struct videobuf_queue *q, ...@@ -656,7 +656,7 @@ videobuf_dqbuf(void *priv, struct videobuf_queue *q,
{ {
struct videobuf_buffer *buf; struct videobuf_buffer *buf;
int retval; int retval;
down(&q->lock); down(&q->lock);
retval = -EBUSY; retval = -EBUSY;
if (q->reading) if (q->reading)
...@@ -697,7 +697,7 @@ int videobuf_streamon(void *priv, struct videobuf_queue *q) ...@@ -697,7 +697,7 @@ int videobuf_streamon(void *priv, struct videobuf_queue *q)
struct list_head *list; struct list_head *list;
unsigned long flags; unsigned long flags;
int retval; int retval;
down(&q->lock); down(&q->lock);
retval = -EBUSY; retval = -EBUSY;
if (q->reading) if (q->reading)
...@@ -756,7 +756,7 @@ videobuf_read_zerocopy(void *priv, struct videobuf_queue *q, ...@@ -756,7 +756,7 @@ videobuf_read_zerocopy(void *priv, struct videobuf_queue *q,
retval = q->ops->buf_prepare(priv,q->read_buf,field); retval = q->ops->buf_prepare(priv,q->read_buf,field);
if (0 != retval) if (0 != retval)
goto done; goto done;
/* start capture & wait */ /* start capture & wait */
spin_lock_irqsave(q->irqlock,flags); spin_lock_irqsave(q->irqlock,flags);
q->ops->buf_queue(priv,q->read_buf); q->ops->buf_queue(priv,q->read_buf);
...@@ -890,7 +890,7 @@ int videobuf_read_start(void *priv, struct videobuf_queue *q) ...@@ -890,7 +890,7 @@ int videobuf_read_start(void *priv, struct videobuf_queue *q)
void videobuf_read_stop(void *priv, struct videobuf_queue *q) void videobuf_read_stop(void *priv, struct videobuf_queue *q)
{ {
int i; int i;
videobuf_queue_cancel(priv,q); videobuf_queue_cancel(priv,q);
INIT_LIST_HEAD(&q->stream); INIT_LIST_HEAD(&q->stream);
for (i = 0; i < VIDEO_MAX_FRAME; i++) { for (i = 0; i < VIDEO_MAX_FRAME; i++) {
...@@ -910,7 +910,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q, ...@@ -910,7 +910,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
unsigned int *fc, bytes; unsigned int *fc, bytes;
int err, retval; int err, retval;
unsigned long flags; unsigned long flags;
dprintk(2,"%s\n",__FUNCTION__); dprintk(2,"%s\n",__FUNCTION__);
down(&q->lock); down(&q->lock);
retval = -EBUSY; retval = -EBUSY;
...@@ -950,7 +950,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q, ...@@ -950,7 +950,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
*fc = q->read_buf->field_count >> 1; *fc = q->read_buf->field_count >> 1;
dprintk(1,"vbihack: %d\n",*fc); dprintk(1,"vbihack: %d\n",*fc);
} }
/* copy stuff */ /* copy stuff */
bytes = count; bytes = count;
if (bytes > q->read_buf->size - q->read_off) if (bytes > q->read_buf->size - q->read_off)
......
/* /*
* $Id: video-buf.h,v 1.7 2004/10/11 14:53:13 kraxel Exp $ * $Id: video-buf.h,v 1.8 2004/10/13 10:39:00 kraxel Exp $
* *
* generic helper functions for video4linux capture buffers, to handle * generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it. * memory management and PCI DMA. Right now bttv + saa7134 use it.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* into PAGE_SIZE chunks). They also assume the driver does not need * into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data (thus it is probably not useful for USB as * to touch the video data (thus it is probably not useful for USB as
* data often must be uncompressed by the drivers). * data often must be uncompressed by the drivers).
* *
* (c) 2001,02 Gerd Knorr <kraxel@bytesex.org> * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -102,7 +102,7 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma); ...@@ -102,7 +102,7 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma);
* functions, additionally some commonly used fields for v4l buffers * functions, additionally some commonly used fields for v4l buffers
* (width, height, lists, waitqueue) are in there. That struct should * (width, height, lists, waitqueue) are in there. That struct should
* be used as first element in the drivers buffer struct. * be used as first element in the drivers buffer struct.
* *
* about the mmap helpers (videobuf_mmap_*): * about the mmap helpers (videobuf_mmap_*):
* *
* The mmaper function allows to map any subset of contingous buffers. * The mmaper function allows to map any subset of contingous buffers.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment