ALSA: hda - Call snd_array_init() early and only once
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 May 2012 12:35:27 +0000 (14:35 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Nov 2012 08:03:39 +0000 (09:03 +0100)
commit361dab3ec2c59044f420cdf232523cd4af4e833e
treea15a6119c598e83bdb5ca45676907c6c0a3645cb
parent04324ccc75f96b3ed7aad1c866d1b7925e977bdf
ALSA: hda - Call snd_array_init() early and only once

This is a preliminary patch for introducing a protection to access
races of snd_array instances.  Call snd_array_init() appropriately
at the initialization time and don't call it twice.

Also the allocations of codec-spec structs are cleaned up by helper
functions in patch_sigmatel.c and patch_analog.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_jack.c
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_via.c