]> git.alsa-project.org Git - alsa-lib.git/commitdiff
seq: Check protocol compatibility with the current version
authorTakashi Iwai <tiwai@suse.de>
Mon, 6 Nov 2023 15:36:55 +0000 (16:36 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 7 Nov 2023 11:16:47 +0000 (12:16 +0100)
There is no need for checking the protocol compatibility with another
version, but we just need to check for the current version.

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

index b74948c81c9eb5f74c2890a43706da07c2ab679e..eeaf26e16d1cd3f643928917d21a0069796d2da8 100644 (file)
@@ -32,7 +32,6 @@ const char *_snd_module_seq_hw = "";
 #ifndef DOC_HIDDEN
 #define SNDRV_FILE_SEQ         ALSA_DEVICE_DIRECTORY "seq"
 #define SNDRV_FILE_ALOADSEQ    ALOAD_DEVICE_DIRECTORY "aloadSEQ"
-#define SNDRV_SEQ_VERSION_MAX  SNDRV_PROTOCOL_VERSION(1, 0, 2)
 
 typedef struct {
        int fd;
@@ -535,7 +534,7 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
                close(fd);
                return ret;
        }
-       if (SNDRV_PROTOCOL_INCOMPATIBLE(ver, SNDRV_SEQ_VERSION_MAX)) {
+       if (SNDRV_PROTOCOL_INCOMPATIBLE(ver, SNDRV_SEQ_VERSION)) {
                close(fd);
                return -SND_ERROR_INCOMPATIBLE_VERSION;
        }