aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-13 11:17:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 11:53:19 -0500
commitae24601b47c3f4a56545ef4cd4e7c821ac1db598 (patch)
tree562258e9fdec32a9b7410a8467dc5315bdbfe8c3 /drivers/media/video/saa7134
parent9d9d6baeca6f9174b8e7fd219a62a8fa09d61cc7 (diff)
V4L/DVB (3485): BUG_ON() Conversion in drivers/video/media
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c3
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c3
-rw-r--r--drivers/media/video/saa7134/saa7134-oss.c6
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c3
4 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index 614f7b92340..64e2c108df3 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -308,8 +308,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev)
308 308
309static int dsp_buffer_free(struct saa7134_dev *dev) 309static int dsp_buffer_free(struct saa7134_dev *dev)
310{ 310{
311 if (!dev->dmasound.blksize) 311 BUG_ON(!dev->dmasound.blksize);
312 BUG();
313 312
314 videobuf_dma_free(&dev->dmasound.dma); 313 videobuf_dma_free(&dev->dmasound.dma);
315 314
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index f5f2cf5d150..be85e0b0cbb 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -256,8 +256,7 @@ void saa7134_pgtable_free(struct pci_dev *pci, struct saa7134_pgtable *pt)
256 256
257void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf) 257void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf)
258{ 258{
259 if (in_interrupt()) 259 BUG_ON(in_interrupt());
260 BUG();
261 260
262 videobuf_waiton(&buf->vb,0,0); 261 videobuf_waiton(&buf->vb,0,0);
263 videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); 262 videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma);
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
index 80e34a5fdcc..d79d05f8870 100644
--- a/drivers/media/video/saa7134/saa7134-oss.c
+++ b/drivers/media/video/saa7134/saa7134-oss.c
@@ -84,8 +84,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev)
84{ 84{
85 int err; 85 int err;
86 86
87 if (!dev->dmasound.bufsize) 87 BUG_ON(!dev->dmasound.bufsize);
88 BUG();
89 videobuf_dma_init(&dev->dmasound.dma); 88 videobuf_dma_init(&dev->dmasound.dma);
90 err = videobuf_dma_init_kernel(&dev->dmasound.dma, PCI_DMA_FROMDEVICE, 89 err = videobuf_dma_init_kernel(&dev->dmasound.dma, PCI_DMA_FROMDEVICE,
91 (dev->dmasound.bufsize + PAGE_SIZE) >> PAGE_SHIFT); 90 (dev->dmasound.bufsize + PAGE_SIZE) >> PAGE_SHIFT);
@@ -96,8 +95,7 @@ static int dsp_buffer_init(struct saa7134_dev *dev)
96 95
97static int dsp_buffer_free(struct saa7134_dev *dev) 96static int dsp_buffer_free(struct saa7134_dev *dev)
98{ 97{
99 if (!dev->dmasound.blksize) 98 BUG_ON(!dev->dmasound.blksize);
100 BUG();
101 videobuf_dma_free(&dev->dmasound.dma); 99 videobuf_dma_free(&dev->dmasound.dma);
102 dev->dmasound.blocks = 0; 100 dev->dmasound.blocks = 0;
103 dev->dmasound.blksize = 0; 101 dev->dmasound.blksize = 0;
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 72f389a51a1..600c3c7e3dc 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -489,8 +489,7 @@ int res_locked(struct saa7134_dev *dev, unsigned int bit)
489static 489static
490void res_free(struct saa7134_dev *dev, struct saa7134_fh *fh, unsigned int bits) 490void res_free(struct saa7134_dev *dev, struct saa7134_fh *fh, unsigned int bits)
491{ 491{
492 if ((fh->resources & bits) != bits) 492 BUG_ON((fh->resources & bits) != bits);
493 BUG();
494 493
495 mutex_lock(&dev->lock); 494 mutex_lock(&dev->lock);
496 fh->resources &= ~bits; 495 fh->resources &= ~bits;