aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:12:14 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:38 -0400
commitda3cec35dd3c31d8706db4bf379372ce70d92118 (patch)
tree9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/atiixp.c
parent622207dc31895b4e82c39100db8635d885c795e2 (diff)
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/atiixp.c')
-rw-r--r--sound/pci/atiixp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 457228fb22aa..ce1eb12768f4 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -722,7 +722,9 @@ static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
722 struct atiixp_dma *dma = substream->runtime->private_data; 722 struct atiixp_dma *dma = substream->runtime->private_data;
723 int err = 0; 723 int err = 0;
724 724
725 snd_assert(dma->ops->enable_transfer && dma->ops->flush_dma, return -EINVAL); 725 if (snd_BUG_ON(!dma->ops->enable_transfer ||
726 !dma->ops->flush_dma))
727 return -EINVAL;
726 728
727 spin_lock(&chip->reg_lock); 729 spin_lock(&chip->reg_lock);
728 switch (cmd) { 730 switch (cmd) {
@@ -1032,7 +1034,8 @@ static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream,
1032 struct snd_pcm_runtime *runtime = substream->runtime; 1034 struct snd_pcm_runtime *runtime = substream->runtime;
1033 int err; 1035 int err;
1034 1036
1035 snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); 1037 if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma))
1038 return -EINVAL;
1036 1039
1037 if (dma->opened) 1040 if (dma->opened)
1038 return -EBUSY; 1041 return -EBUSY;
@@ -1064,7 +1067,8 @@ static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream,
1064{ 1067{
1065 struct atiixp *chip = snd_pcm_substream_chip(substream); 1068 struct atiixp *chip = snd_pcm_substream_chip(substream);
1066 /* disable DMA bits */ 1069 /* disable DMA bits */
1067 snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); 1070 if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma))
1071 return -EINVAL;
1068 spin_lock_irq(&chip->reg_lock); 1072 spin_lock_irq(&chip->reg_lock);
1069 dma->ops->enable_dma(chip, 0); 1073 dma->ops->enable_dma(chip, 0);
1070 spin_unlock_irq(&chip->reg_lock); 1074 spin_unlock_irq(&chip->reg_lock);