summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/video-buf.c
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-10-13 10:38:59 +0000
committerGerd Knorr <devnull@localhost>2004-10-13 10:38:59 +0000
commitedd4507a9edff255a67ce707442560a4ec4b3b14 (patch)
treed7c709acacb87b01d70340692df17aebcfbe2913 /linux/drivers/media/video/video-buf.c
parentc391a6857f19bd7eb8b9a40dc238242c34332f7a (diff)
downloadmediapointer-dvb-s2-edd4507a9edff255a67ce707442560a4ec4b3b14.tar.gz
mediapointer-dvb-s2-edd4507a9edff255a67ce707442560a4ec4b3b14.tar.bz2
- kill trailing whitespaces.
Diffstat (limited to 'linux/drivers/media/video/video-buf.c')
-rw-r--r--linux/drivers/media/video/video-buf.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 219143d0a..96964242a 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -1,5 +1,5 @@
/*
- * $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
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -9,7 +9,7 @@
* 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
* as data often must be uncompressed by the drivers).
- *
+ *
* (c) 2001-2004 Gerd Knorr <kraxel@bytesex.org> [SUSE Labs]
*
* This program is free software; you can redistribute it and/or modify
@@ -71,7 +71,7 @@ videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages)
sglist[i].length = PAGE_SIZE;
}
return sglist;
-
+
err:
kfree(sglist);
return NULL;
@@ -198,7 +198,7 @@ int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma)
{
MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
BUG_ON(0 == dma->nr_pages);
-
+
if (dma->pages) {
dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages,
dma->offset);
@@ -299,7 +299,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr)
{
int retval = 0;
DECLARE_WAITQUEUE(wait, current);
-
+
MAGIC_CHECK(vb->magic,MAGIC_BUFFER);
add_wait_queue(&vb->done, &wait);
while (vb->state == STATE_ACTIVE || vb->state == STATE_QUEUED) {
@@ -365,7 +365,7 @@ videobuf_iolock(struct pci_dev *pci, struct videobuf_buffer *vb,
err = videobuf_dma_pci_map(pci,&vb->dma);
if (0 != err)
return err;
-
+
return 0;
}
@@ -393,11 +393,11 @@ videobuf_queue_init(struct videobuf_queue *q,
INIT_LIST_HEAD(&q->stream);
}
-int
+int
videobuf_queue_is_busy(struct videobuf_queue *q)
{
int i;
-
+
if (q->streaming) {
dprintk(1,"busy: streaming active\n");
return 1;
@@ -646,7 +646,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q,
retval = q->ops->buf_prepare(priv,buf,field);
if (0 != retval)
goto done;
-
+
list_add_tail(&buf->stream,&q->stream);
if (q->streaming) {
spin_lock_irqsave(q->irqlock,flags);
@@ -654,7 +654,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q,
spin_unlock_irqrestore(q->irqlock,flags);
}
retval = 0;
-
+
done:
up(&q->lock);
return retval;
@@ -666,7 +666,7 @@ videobuf_dqbuf(void *priv, struct videobuf_queue *q,
{
struct videobuf_buffer *buf;
int retval;
-
+
down(&q->lock);
retval = -EBUSY;
if (q->reading)
@@ -707,7 +707,7 @@ int videobuf_streamon(void *priv, struct videobuf_queue *q)
struct list_head *list;
unsigned long flags;
int retval;
-
+
down(&q->lock);
retval = -EBUSY;
if (q->reading)
@@ -766,7 +766,7 @@ videobuf_read_zerocopy(void *priv, struct videobuf_queue *q,
retval = q->ops->buf_prepare(priv,q->read_buf,field);
if (0 != retval)
goto done;
-
+
/* start capture & wait */
spin_lock_irqsave(q->irqlock,flags);
q->ops->buf_queue(priv,q->read_buf);
@@ -900,7 +900,7 @@ int videobuf_read_start(void *priv, struct videobuf_queue *q)
void videobuf_read_stop(void *priv, struct videobuf_queue *q)
{
int i;
-
+
videobuf_queue_cancel(priv,q);
INIT_LIST_HEAD(&q->stream);
for (i = 0; i < VIDEO_MAX_FRAME; i++) {
@@ -920,7 +920,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
unsigned int *fc, bytes;
int err, retval;
unsigned long flags;
-
+
dprintk(2,"%s\n",__FUNCTION__);
down(&q->lock);
retval = -EBUSY;
@@ -960,7 +960,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
*fc = q->read_buf->field_count >> 1;
dprintk(1,"vbihack: %d\n",*fc);
}
-
+
/* copy stuff */
bytes = count;
if (bytes > q->read_buf->size - q->read_off)