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/via82xx.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/via82xx.c')
-rw-r--r-- | sound/pci/via82xx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 6781be9e3078..84ea35d8b252 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -824,7 +824,8 @@ static snd_pcm_uframes_t snd_via686_pcm_pointer(struct snd_pcm_substream *substr | |||
824 | struct viadev *viadev = substream->runtime->private_data; | 824 | struct viadev *viadev = substream->runtime->private_data; |
825 | unsigned int idx, ptr, count, res; | 825 | unsigned int idx, ptr, count, res; |
826 | 826 | ||
827 | snd_assert(viadev->tbl_entries, return 0); | 827 | if (snd_BUG_ON(!viadev->tbl_entries)) |
828 | return 0; | ||
828 | if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE)) | 829 | if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE)) |
829 | return 0; | 830 | return 0; |
830 | 831 | ||
@@ -855,7 +856,8 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst | |||
855 | unsigned int idx, count, res; | 856 | unsigned int idx, count, res; |
856 | int status; | 857 | int status; |
857 | 858 | ||
858 | snd_assert(viadev->tbl_entries, return 0); | 859 | if (snd_BUG_ON(!viadev->tbl_entries)) |
860 | return 0; | ||
859 | 861 | ||
860 | spin_lock(&chip->reg_lock); | 862 | spin_lock(&chip->reg_lock); |
861 | count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)); | 863 | count = inl(VIADEV_REG(viadev, OFFSET_CURR_COUNT)); |
@@ -1037,7 +1039,7 @@ static int snd_via8233_playback_prepare(struct snd_pcm_substream *substream) | |||
1037 | else | 1039 | else |
1038 | rbits = (0x100000 / 48000) * runtime->rate + | 1040 | rbits = (0x100000 / 48000) * runtime->rate + |
1039 | ((0x100000 % 48000) * runtime->rate) / 48000; | 1041 | ((0x100000 % 48000) * runtime->rate) / 48000; |
1040 | snd_assert((rbits & ~0xfffff) == 0, return -EINVAL); | 1042 | snd_BUG_ON(rbits & ~0xfffff); |
1041 | snd_via82xx_channel_reset(chip, viadev); | 1043 | snd_via82xx_channel_reset(chip, viadev); |
1042 | snd_via82xx_set_table_ptr(chip, viadev); | 1044 | snd_via82xx_set_table_ptr(chip, viadev); |
1043 | outb(chip->playback_volume[viadev->reg_offset / 0x10][0], | 1045 | outb(chip->playback_volume[viadev->reg_offset / 0x10][0], |