diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-13 11:17:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 11:53:19 -0500 |
commit | ae24601b47c3f4a56545ef4cd4e7c821ac1db598 (patch) | |
tree | 562258e9fdec32a9b7410a8467dc5315bdbfe8c3 /drivers/media/video | |
parent | 9d9d6baeca6f9174b8e7fd219a62a8fa09d61cc7 (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')
-rw-r--r-- | drivers/media/video/bttv-risc.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-oss.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 3 | ||||
-rw-r--r-- | drivers/media/video/video-buf.c | 3 |
8 files changed, 9 insertions, 18 deletions
diff --git a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c index 5c746110df62..344f84e9af04 100644 --- a/drivers/media/video/bttv-risc.c +++ b/drivers/media/video/bttv-risc.c | |||
@@ -511,8 +511,7 @@ bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc, | |||
511 | void | 511 | void |
512 | bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf) | 512 | bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf) |
513 | { | 513 | { |
514 | if (in_interrupt()) | 514 | BUG_ON(in_interrupt()); |
515 | BUG(); | ||
516 | videobuf_waiton(&buf->vb,0,0); | 515 | videobuf_waiton(&buf->vb,0,0); |
517 | videobuf_dma_pci_unmap(btv->c.pci, &buf->vb.dma); | 516 | videobuf_dma_pci_unmap(btv->c.pci, &buf->vb.dma); |
518 | videobuf_dma_free(&buf->vb.dma); | 517 | videobuf_dma_free(&buf->vb.dma); |
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 25be3a976d09..c2cdbafdb77b 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -215,8 +215,7 @@ int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
215 | void | 215 | void |
216 | cx88_free_buffer(struct pci_dev *pci, struct cx88_buffer *buf) | 216 | cx88_free_buffer(struct pci_dev *pci, struct cx88_buffer *buf) |
217 | { | 217 | { |
218 | if (in_interrupt()) | 218 | BUG_ON(in_interrupt()); |
219 | BUG(); | ||
220 | videobuf_waiton(&buf->vb,0,0); | 219 | videobuf_waiton(&buf->vb,0,0); |
221 | videobuf_dma_pci_unmap(pci, &buf->vb.dma); | 220 | videobuf_dma_pci_unmap(pci, &buf->vb.dma); |
222 | videobuf_dma_free(&buf->vb.dma); | 221 | videobuf_dma_free(&buf->vb.dma); |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index b1892dff0fe8..6c97aa740d27 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -366,8 +366,7 @@ static | |||
366 | void res_free(struct cx8800_dev *dev, struct cx8800_fh *fh, unsigned int bits) | 366 | void res_free(struct cx8800_dev *dev, struct cx8800_fh *fh, unsigned int bits) |
367 | { | 367 | { |
368 | struct cx88_core *core = dev->core; | 368 | struct cx88_core *core = dev->core; |
369 | if ((fh->resources & bits) != bits) | 369 | BUG_ON((fh->resources & bits) != bits); |
370 | BUG(); | ||
371 | 370 | ||
372 | mutex_lock(&core->lock); | 371 | mutex_lock(&core->lock); |
373 | fh->resources &= ~bits; | 372 | fh->resources &= ~bits; |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index 614f7b923403..64e2c108df34 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 | ||
309 | static int dsp_buffer_free(struct saa7134_dev *dev) | 309 | static 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 f5f2cf5d1507..be85e0b0cbb0 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 | ||
257 | void saa7134_dma_free(struct saa7134_dev *dev,struct saa7134_buf *buf) | 257 | void 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 80e34a5fdcc5..d79d05f88705 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 | ||
97 | static int dsp_buffer_free(struct saa7134_dev *dev) | 96 | static 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 72f389a51a13..600c3c7e3dca 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) | |||
489 | static | 489 | static |
490 | void res_free(struct saa7134_dev *dev, struct saa7134_fh *fh, unsigned int bits) | 490 | void 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; |
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c index cb1c228e29f8..a8918e839f65 100644 --- a/drivers/media/video/video-buf.c +++ b/drivers/media/video/video-buf.c | |||
@@ -59,8 +59,7 @@ videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages) | |||
59 | pg = vmalloc_to_page(virt); | 59 | pg = vmalloc_to_page(virt); |
60 | if (NULL == pg) | 60 | if (NULL == pg) |
61 | goto err; | 61 | goto err; |
62 | if (PageHighMem(pg)) | 62 | BUG_ON(PageHighMem(pg)); |
63 | BUG(); | ||
64 | sglist[i].page = pg; | 63 | sglist[i].page = pg; |
65 | sglist[i].length = PAGE_SIZE; | 64 | sglist[i].length = PAGE_SIZE; |
66 | } | 65 | } |