aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-24 18:49:12 +0100
committerAdrian Bunk <bunk@stusta.de>2006-03-24 18:49:12 +0100
commit817dd6eed4bf40fa14d1e96ac4905efebd5e03f2 (patch)
treea322cc013acfe1bde06dc58aacacb59c02cf7276
parent7ac1e877d48061aa6ebca936189c32b44ccf8d9c (diff)
BUG_ON() Conversion in sound/sparc/cs4231.c
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r--sound/sparc/cs4231.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 53a148b01b6..8804f26ddb3 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -611,8 +611,7 @@ static void snd_cs4231_advance_dma(struct cs4231_dma_control *dma_cont,
unsigned int period_size = snd_pcm_lib_period_bytes(substream);
unsigned int offset = period_size * (*periods_sent);
- if (period_size >= (1 << 24))
- BUG();
+ BUG_ON(period_size >= (1 << 24));
if (dma_cont->request(dma_cont, runtime->dma_addr + offset, period_size))
return;
@@ -1079,8 +1078,7 @@ static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream)
chip->image[CS4231_IFACE_CTRL] &= ~(CS4231_PLAYBACK_ENABLE |
CS4231_PLAYBACK_PIO);
- if (runtime->period_size > 0xffff + 1)
- BUG();
+ BUG_ON(runtime->period_size > 0xffff + 1);
chip->p_periods_sent = 0;
spin_unlock_irqrestore(&chip->lock, flags);