]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - sound/pci/hda/hda_generic.c
ALSA: hda - Bind codecs via standard bus
[mirror_ubuntu-bionic-kernel.git] / sound / pci / hda / hda_generic.c
index b680b4ec63313c8b1152390dbbf602018a212952..947d1a50f3840b5903a07787eaea410428ab53eb 100644 (file)
@@ -5493,13 +5493,11 @@ static const struct hda_codec_ops generic_patch_ops = {
 #endif
 };
 
-/**
+/*
  * snd_hda_parse_generic_codec - Generic codec parser
  * @codec: the HDA codec
- *
- * This should be called from the HDA codec core.
  */
-int snd_hda_parse_generic_codec(struct hda_codec *codec)
+static int snd_hda_parse_generic_codec(struct hda_codec *codec)
 {
        struct hda_gen_spec *spec;
        int err;
@@ -5525,7 +5523,17 @@ error:
        snd_hda_gen_free(codec);
        return err;
 }
-EXPORT_SYMBOL_GPL(snd_hda_parse_generic_codec);
+
+static const struct hda_codec_preset snd_hda_preset_generic[] = {
+       { .id = HDA_CODEC_ID_GENERIC, .patch = snd_hda_parse_generic_codec },
+       {} /* terminator */
+};
+
+static struct hda_codec_driver generic_driver = {
+       .preset = snd_hda_preset_generic,
+};
+
+module_hda_codec_driver(generic_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Generic HD-audio codec parser");