diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-10-01 16:20:04 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-20 10:15:20 +0200 |
commit | b9a94a9c787d053e8d3bb7e7dff9648e723a4533 (patch) | |
tree | 5aa9dc1c591e16d5eb6a1e99d03f2d57bac5d90f /sound/pci/hda/hda_generic.c | |
parent | ALSA: hda - Add hdaudio bus modalias support (diff) | |
download | linux-b9a94a9c787d053e8d3bb7e7dff9648e723a4533.tar.xz linux-b9a94a9c787d053e8d3bb7e7dff9648e723a4533.zip |
ALSA: hda - convert to hda_device_id
Finally we have a proper infrastructure to generate the modaliases
automatically, let's move to hda_device_id from the legacy
hda_codec_preset that contains basically the same information.
The patch function hook is stored in driver_data field, which is long,
and we need an explicit cast. Other than that, the conversion is
mostly straightforward. Each entry is even simplified using a macro,
and the lengthy (and error-prone) manual modaliases got removed.
As a result, we achieved a quite good diet:
14 files changed, 407 insertions(+), 595 deletions(-)
Reviewed-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r-- | sound/pci/hda/hda_generic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 24f91114a32c..c6e8a651cea1 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -5877,13 +5877,14 @@ error: return err; } -static const struct hda_codec_preset snd_hda_preset_generic[] = { - { .id = HDA_CODEC_ID_GENERIC, .patch = snd_hda_parse_generic_codec }, +static const struct hda_device_id snd_hda_id_generic[] = { + HDA_CODEC_ENTRY(HDA_CODEC_ID_GENERIC, "Generic", snd_hda_parse_generic_codec), {} /* terminator */ }; +MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_generic); static struct hda_codec_driver generic_driver = { - .preset = snd_hda_preset_generic, + .id = snd_hda_id_generic, }; module_hda_codec_driver(generic_driver); |