OSDN Git Service

mixer: Remove redundant CHECK_ENUM() from snd_mixer_selem_is_enum*()
authorTakashi Iwai <tiwai@suse.de>
Tue, 13 Mar 2012 13:30:22 +0000 (14:30 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 13 Mar 2012 13:30:22 +0000 (14:30 +0100)
The functions to check whether the element is an enum don't need the
extra check of the type.  It should return simply 0 or 1 without error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/mixer/simple.c

index 8079fe7..ec22a9c 100644 (file)
@@ -889,7 +889,6 @@ int snd_mixer_selem_is_enumerated(snd_mixer_elem_t *elem)
 int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem)
 {
        CHECK_BASIC(elem);
-       CHECK_ENUM(elem);
        return sm_selem_ops(elem)->is(elem, SM_PLAY, SM_OPS_IS_ENUMERATED, 1);
 }
 
@@ -901,7 +900,6 @@ int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem)
 int snd_mixer_selem_is_enum_capture(snd_mixer_elem_t *elem)
 {
        CHECK_BASIC(elem);
-       CHECK_ENUM(elem);
        return sm_selem_ops(elem)->is(elem, SM_CAPT, SM_OPS_IS_ENUMERATED, 1);
 }