ALSA: hda: take cmd_mutex in probe_codec()

Now that each codec will have its own module, it is possible
for the user to load one codec while another one is running.

So cmd_mutex would be a safe addition to probe_codec().

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Wu Fengguang and committed by Takashi Iwai a678cdee deadff16

+2
+2
sound/pci/hda/hda_intel.c
··· 1275 1275 (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; 1276 1276 unsigned int res; 1277 1277 1278 + mutex_lock(&chip->bus->cmd_mutex); 1278 1279 chip->probing = 1; 1279 1280 azx_send_cmd(chip->bus, cmd); 1280 1281 res = azx_get_response(chip->bus, addr); 1281 1282 chip->probing = 0; 1283 + mutex_unlock(&chip->bus->cmd_mutex); 1282 1284 if (res == -1) 1283 1285 return -EIO; 1284 1286 snd_printdd(SFX "codec #%d probed OK\n", addr);