ALSA: hda: Reuse for_each_pcm_streams()
authorCezary Rojewski <cezary.rojewski@intel.com>
Mon, 26 Feb 2024 12:44:32 +0000 (13:44 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 4 Mar 2024 08:17:02 +0000 (09:17 +0100)
Use the macro to improve readability.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240226124432.1203798-6-cezary.rojewski@intel.com
sound/pci/hda/hda_codec.c

index 12f02cdc965942ef85c8bac1e0f15f680604ca68..2cac337f526322270e7afa25fd2119f7aa3bf8af 100644 (file)
@@ -3313,7 +3313,7 @@ int snd_hda_codec_parse_pcms(struct hda_codec *codec)
        list_for_each_entry(cpcm, &codec->pcm_list_head, list) {
                int stream;
 
-               for (stream = 0; stream < 2; stream++) {
+               for_each_pcm_streams(stream) {
                        struct hda_pcm_stream *info = &cpcm->stream[stream];
 
                        if (!info->substreams)