aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5b54ac07fcbd..0741eda78a5e 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -393,6 +393,20 @@ static int snd_hda_bus_dev_free(struct snd_device *device)
393 return snd_hda_bus_free(bus); 393 return snd_hda_bus_free(bus);
394} 394}
395 395
396#ifdef CONFIG_SND_HDA_HWDEP
397static int snd_hda_bus_dev_register(struct snd_device *device)
398{
399 struct hda_bus *bus = device->device_data;
400 struct hda_codec *codec;
401 list_for_each_entry(codec, &bus->codec_list, list) {
402 snd_hda_hwdep_add_sysfs(codec);
403 }
404 return 0;
405}
406#else
407#define snd_hda_bus_dev_register NULL
408#endif
409
396/** 410/**
397 * snd_hda_bus_new - create a HDA bus 411 * snd_hda_bus_new - create a HDA bus
398 * @card: the card entry 412 * @card: the card entry
@@ -408,6 +422,7 @@ int __devinit snd_hda_bus_new(struct snd_card *card,
408 struct hda_bus *bus; 422 struct hda_bus *bus;
409 int err; 423 int err;
410 static struct snd_device_ops dev_ops = { 424 static struct snd_device_ops dev_ops = {
425 .dev_register = snd_hda_bus_dev_register,
411 .dev_free = snd_hda_bus_dev_free, 426 .dev_free = snd_hda_bus_dev_free,
412 }; 427 };
413 428
@@ -686,9 +701,7 @@ int __devinit snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
686 } 701 }
687 snd_hda_codec_proc_new(codec); 702 snd_hda_codec_proc_new(codec);
688 703
689#ifdef CONFIG_SND_HDA_HWDEP
690 snd_hda_create_hwdep(codec); 704 snd_hda_create_hwdep(codec);
691#endif
692 705
693 sprintf(component, "HDA:%08x,%08x,%08x", codec->vendor_id, 706 sprintf(component, "HDA:%08x,%08x,%08x", codec->vendor_id,
694 codec->subsystem_id, codec->revision_id); 707 codec->subsystem_id, codec->revision_id);