summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbui duc phuc <phucduc.bui@gmail.com>2026-07-07 14:45:56 +0700
committerTakashi Iwai <tiwai@suse.de>2026-07-07 16:36:17 +0200
commit5171dddf10f8ebd62e2eb6dfea40d770f6d70e5f (patch)
tree2156f3f98141b5e5d902216364fbac08270640a8
parentcd3447e1b6425efd1704ed07f1f245c842927eb0 (diff)
downloadlinux-5171dddf10f8ebd62e2eb6dfea40d770f6d70e5f.tar.gz
linux-5171dddf10f8ebd62e2eb6dfea40d770f6d70e5f.zip
ALSA: core: use ARRAY_SIZE() in snd_minor_info_read()
Use ARRAY_SIZE(snd_minors) instead of SNDRV_OS_MINORS directly, for consistency with snd_find_free_minor() and snd_unregister_device() in the same file. No functional change. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260707074556.569451-1-phucduc.bui@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/core/sound.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 3e1969a52b21..17c380d8d8be 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -358,7 +358,7 @@ static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_bu
struct snd_minor *mptr;
guard(mutex)(&sound_mutex);
- for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) {
+ for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) {
mptr = snd_minors[minor];
if (!mptr)
continue;