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/core/pcm_native.c | |
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/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index e97b2d162cc7..e6e2b70314c0 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -2053,7 +2053,8 @@ static int snd_pcm_open(struct inode *inode, struct file *file) | |||
2053 | snd_pcm_file_t *pcm_file; | 2053 | snd_pcm_file_t *pcm_file; |
2054 | wait_queue_t wait; | 2054 | wait_queue_t wait; |
2055 | 2055 | ||
2056 | snd_runtime_check(device >= SNDRV_MINOR_PCM_PLAYBACK && device < SNDRV_MINOR_DEVICES, return -ENXIO); | 2056 | if (device < SNDRV_MINOR_PCM_PLAYBACK || device >= SNDRV_MINOR_DEVICES) |
2057 | return -ENXIO; | ||
2057 | pcm = snd_pcm_devices[(cardnum * SNDRV_PCM_DEVICES) + (device % SNDRV_MINOR_PCMS)]; | 2058 | pcm = snd_pcm_devices[(cardnum * SNDRV_PCM_DEVICES) + (device % SNDRV_MINOR_PCMS)]; |
2058 | if (pcm == NULL) { | 2059 | if (pcm == NULL) { |
2059 | err = -ENODEV; | 2060 | err = -ENODEV; |