diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-10-10 05:46:31 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:17:42 -0500 |
commit | 7c22f1aaa23370bf9ba2dd3abbccbed70dced216 (patch) | |
tree | ebc9c1e5cfdab4815afdfab1ba583e6220287252 /sound/pci/ac97 | |
parent | f01cc521a2abef5dba24fb0873b9626ba6b0a0a5 (diff) |
[ALSA] Remove snd_runtime_check() macro
Remove snd_runtime_check() macro.
This macro worsens the readability of codes. They should be either
normal if() or removable asserts.
Also, the assert displays stack-dump, instead of only the last caller
pointer.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 1 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 56549add80a8..bbc409ae7ee9 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1127,7 +1127,6 @@ snd_kcontrol_t *snd_ac97_cnew(const snd_kcontrol_new_t *_template, ac97_t * ac97 | |||
1127 | { | 1127 | { |
1128 | snd_kcontrol_new_t template; | 1128 | snd_kcontrol_new_t template; |
1129 | memcpy(&template, _template, sizeof(template)); | 1129 | memcpy(&template, _template, sizeof(template)); |
1130 | snd_runtime_check(!template.index, return NULL); | ||
1131 | template.index = ac97->num; | 1130 | template.index = ac97->num; |
1132 | return snd_ctl_new1(&template, ac97); | 1131 | return snd_ctl_new1(&template, ac97); |
1133 | } | 1132 | } |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index b24beb32961e..de1c72ad2c6b 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1460,7 +1460,8 @@ int patch_ad1881(ac97_t * ac97) | |||
1460 | codecs[1] = patch_ad1881_unchained(ac97, 1, (1<<14)); | 1460 | codecs[1] = patch_ad1881_unchained(ac97, 1, (1<<14)); |
1461 | codecs[2] = patch_ad1881_unchained(ac97, 2, (1<<13)); | 1461 | codecs[2] = patch_ad1881_unchained(ac97, 2, (1<<13)); |
1462 | 1462 | ||
1463 | snd_runtime_check(codecs[0] | codecs[1] | codecs[2], goto __end); | 1463 | if (! (codecs[0] || codecs[1] || codecs[2])) |
1464 | goto __end; | ||
1464 | 1465 | ||
1465 | for (idx = 0; idx < 3; idx++) | 1466 | for (idx = 0; idx < 3; idx++) |
1466 | if (ac97->spec.ad18xx.unchained[idx]) | 1467 | if (ac97->spec.ad18xx.unchained[idx]) |