ALSA: hda - Use a macro for snd_array iteration loops
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Apr 2018 15:24:56 +0000 (17:24 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 24 Apr 2018 11:41:53 +0000 (13:41 +0200)
commita9c2dfc8527318a27db045cd7ea51e8ecab8c884
treef951cd3875949bf9b330ac2fa62b252003da42f7
parentf656891c66193345ee90b212b280d726792dc16c
ALSA: hda - Use a macro for snd_array iteration loops

Introduce a new helper macro, snd_array_for_each(), to iterate for
each snd_array element.  It slightly improves the readability than
lengthy open codes at each place.

Along with it, add const prefix to some obvious places.

There should be no functional changes by this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/hdaudio.h
sound/hda/hdac_regmap.c
sound/pci/hda/hda_auto_parser.c
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_generic.c
sound/pci/hda/hda_sysfs.c
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_realtek.c