瀏覽代碼

ALSA: hda - Intialize more codec fields in snd_hda_codec_reset()

Initiailize forgotten fields in snd_hda_codec_reset().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 16 年之前
父節點
當前提交
d1f1af2dbf
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      sound/pci/hda/hda_codec.c

+ 3 - 0
sound/pci/hda/hda_codec.c

@@ -1519,6 +1519,9 @@ int snd_hda_codec_reset(struct hda_codec *codec)
 	codec->num_pcms = 0;
 	codec->num_pcms = 0;
 	codec->pcm_info = NULL;
 	codec->pcm_info = NULL;
 	codec->preset = NULL;
 	codec->preset = NULL;
+	memset(&codec->patch_ops, 0, sizeof(codec->patch_ops));
+	codec->slave_dig_outs = NULL;
+	codec->spdif_status_reset = 0;
 	module_put(codec->owner);
 	module_put(codec->owner);
 	codec->owner = NULL;
 	codec->owner = NULL;