diff options
Diffstat (limited to 'sound/pci/hda/patch_si3054.c')
-rw-r--r-- | sound/pci/hda/patch_si3054.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c index 3208ad69583e..df243134baa8 100644 --- a/sound/pci/hda/patch_si3054.c +++ b/sound/pci/hda/patch_si3054.c | |||
@@ -83,7 +83,6 @@ | |||
83 | 83 | ||
84 | struct si3054_spec { | 84 | struct si3054_spec { |
85 | unsigned international; | 85 | unsigned international; |
86 | struct hda_pcm pcm; | ||
87 | }; | 86 | }; |
88 | 87 | ||
89 | 88 | ||
@@ -199,11 +198,11 @@ static const struct hda_pcm_stream si3054_pcm = { | |||
199 | 198 | ||
200 | static int si3054_build_pcms(struct hda_codec *codec) | 199 | static int si3054_build_pcms(struct hda_codec *codec) |
201 | { | 200 | { |
202 | struct si3054_spec *spec = codec->spec; | 201 | struct hda_pcm *info; |
203 | struct hda_pcm *info = &spec->pcm; | 202 | |
204 | codec->num_pcms = 1; | 203 | info = snd_hda_codec_pcm_new(codec, "Si3054 Modem"); |
205 | codec->pcm_info = info; | 204 | if (!info) |
206 | info->name = "Si3054 Modem"; | 205 | return -ENOMEM; |
207 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = si3054_pcm; | 206 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = si3054_pcm; |
208 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = si3054_pcm; | 207 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = si3054_pcm; |
209 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = codec->mfg; | 208 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = codec->mfg; |
@@ -319,20 +318,8 @@ MODULE_ALIAS("snd-hda-codec-id:18540018"); | |||
319 | MODULE_LICENSE("GPL"); | 318 | MODULE_LICENSE("GPL"); |
320 | MODULE_DESCRIPTION("Si3054 HD-audio modem codec"); | 319 | MODULE_DESCRIPTION("Si3054 HD-audio modem codec"); |
321 | 320 | ||
322 | static struct hda_codec_preset_list si3054_list = { | 321 | static struct hda_codec_driver si3054_driver = { |
323 | .preset = snd_hda_preset_si3054, | 322 | .preset = snd_hda_preset_si3054, |
324 | .owner = THIS_MODULE, | ||
325 | }; | 323 | }; |
326 | 324 | ||
327 | static int __init patch_si3054_init(void) | 325 | module_hda_codec_driver(si3054_driver); |
328 | { | ||
329 | return snd_hda_add_codec_preset(&si3054_list); | ||
330 | } | ||
331 | |||
332 | static void __exit patch_si3054_exit(void) | ||
333 | { | ||
334 | snd_hda_delete_codec_preset(&si3054_list); | ||
335 | } | ||
336 | |||
337 | module_init(patch_si3054_init) | ||
338 | module_exit(patch_si3054_exit) | ||