summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_cmedia.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-05-29 11:42:14 +0300
committerTakashi Iwai <tiwai@suse.de>2015-05-29 11:42:14 +0300
commit225068ab274dbd5c3a43fd80a6d553ccdf7b2c6f (patch)
treeb9832b957377c6bfe5c6bce56b29a2eff03f3072 /sound/pci/hda/patch_cmedia.c
parent984a8547052711867332eeaec4141755fc040553 (diff)
downloadlinux-225068ab274dbd5c3a43fd80a6d553ccdf7b2c6f.tar.xz
ALSA: hda - Set patch_ops before calling auto-parser
... so that the parser code can overwrite some optional ops. For Realtek and others, it can be set solely in the spec allocator, so it results in a good code cleanup, too. With this change, we can finally remove the local stream_pm setup and rely on the generic parser's automatic setting. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cmedia.c')
-rw-r--r--sound/pci/hda/patch_cmedia.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index 617d9012e78a..f5ed078710f8 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -57,6 +57,7 @@ static int patch_cmi9880(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
+ codec->patch_ops = cmi_auto_patch_ops;
cfg = &spec->gen.autocfg;
snd_hda_gen_spec_init(&spec->gen);
@@ -67,7 +68,6 @@ static int patch_cmi9880(struct hda_codec *codec)
if (err < 0)
goto error;
- codec->patch_ops = cmi_auto_patch_ops;
return 0;
error:
@@ -86,6 +86,7 @@ static int patch_cmi8888(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
+ codec->patch_ops = cmi_auto_patch_ops;
cfg = &spec->gen.autocfg;
snd_hda_gen_spec_init(&spec->gen);
@@ -112,7 +113,6 @@ static int patch_cmi8888(struct hda_codec *codec)
}
}
- codec->patch_ops = cmi_auto_patch_ops;
return 0;
error: