diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:12:14 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:38 -0400 |
commit | da3cec35dd3c31d8706db4bf379372ce70d92118 (patch) | |
tree | 9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/atiixp_modem.c | |
parent | 622207dc31895b4e82c39100db8635d885c795e2 (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_modem.c')
-rw-r--r-- | sound/pci/atiixp_modem.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index d457a32a7939..2f106306c7fe 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -674,7 +674,9 @@ static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
674 | struct atiixp_dma *dma = substream->runtime->private_data; | 674 | struct atiixp_dma *dma = substream->runtime->private_data; |
675 | int err = 0; | 675 | int err = 0; |
676 | 676 | ||
677 | snd_assert(dma->ops->enable_transfer && dma->ops->flush_dma, return -EINVAL); | 677 | if (snd_BUG_ON(!dma->ops->enable_transfer || |
678 | !dma->ops->flush_dma)) | ||
679 | return -EINVAL; | ||
678 | 680 | ||
679 | spin_lock(&chip->reg_lock); | 681 | spin_lock(&chip->reg_lock); |
680 | switch(cmd) { | 682 | switch(cmd) { |
@@ -865,7 +867,8 @@ static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream, | |||
865 | .mask = 0, | 867 | .mask = 0, |
866 | }; | 868 | }; |
867 | 869 | ||
868 | snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); | 870 | if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma)) |
871 | return -EINVAL; | ||
869 | 872 | ||
870 | if (dma->opened) | 873 | if (dma->opened) |
871 | return -EBUSY; | 874 | return -EBUSY; |
@@ -895,7 +898,8 @@ static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream, | |||
895 | { | 898 | { |
896 | struct atiixp_modem *chip = snd_pcm_substream_chip(substream); | 899 | struct atiixp_modem *chip = snd_pcm_substream_chip(substream); |
897 | /* disable DMA bits */ | 900 | /* disable DMA bits */ |
898 | snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); | 901 | if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma)) |
902 | return -EINVAL; | ||
899 | spin_lock_irq(&chip->reg_lock); | 903 | spin_lock_irq(&chip->reg_lock); |
900 | dma->ops->enable_dma(chip, 0); | 904 | dma->ops->enable_dma(chip, 0); |
901 | spin_unlock_irq(&chip->reg_lock); | 905 | spin_unlock_irq(&chip->reg_lock); |