aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_si3054.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-23 08:14:02 -0400
committerTakashi Iwai <tiwai@suse.de>2015-03-23 08:14:02 -0400
commit3372dbdd8ca11f51be8c6a30b2bc79eb04c4a902 (patch)
treed4499bf5a5665b4820ffaf96bce55bf6b895195e /sound/pci/hda/patch_si3054.c
parentbc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff)
parent967b1307b69b8ada8b331e01046ad1ef83742e99 (diff)
Merge branch 'for-next' into topic/hda-core
Diffstat (limited to 'sound/pci/hda/patch_si3054.c')
-rw-r--r--sound/pci/hda/patch_si3054.c27
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
84struct si3054_spec { 84struct 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
200static int si3054_build_pcms(struct hda_codec *codec) 199static 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");
319MODULE_LICENSE("GPL"); 318MODULE_LICENSE("GPL");
320MODULE_DESCRIPTION("Si3054 HD-audio modem codec"); 319MODULE_DESCRIPTION("Si3054 HD-audio modem codec");
321 320
322static struct hda_codec_preset_list si3054_list = { 321static 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
327static int __init patch_si3054_init(void) 325module_hda_codec_driver(si3054_driver);
328{
329 return snd_hda_add_codec_preset(&si3054_list);
330}
331
332static void __exit patch_si3054_exit(void)
333{
334 snd_hda_delete_codec_preset(&si3054_list);
335}
336
337module_init(patch_si3054_init)
338module_exit(patch_si3054_exit)