aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2005-09-03 06:05:47 -0400
committerJaroslav Kysela <perex@suse.cz>2005-09-12 04:41:07 -0400
commit025cd2f6b1624f536d4df564add3d13ea5022f53 (patch)
tree45086e3e3b82b37b43c2e1189c7c8b99947b43f0 /sound/pci
parenta5022b0dc6e45254437b75289e773876bb43e262 (diff)
[ALSA] snd-ca0106, snd-emu10k1: Add symlink in the sys tree.
CA0106 driver,EMU10K1/EMU10K2 driver A thread appeared on the LKML. This patch implements the fix. Question: in sysfs, /sys/bus/*/drivers lists the driver names, with their exported .name (eg. '.name = 'EMU10K1_Audigy'' in the module code, from now on 'driver name'). In /sys/modules, the kernel modules are listed with their module name, eg. snd_emu10k1. However, it seems to me that in sysfs, there is no way in particular to tell, which module has which .name. That is, that snd_emu10k1 is EMU10K1_Audigy and vice versa. I wonder whether it wouldn't be possible to add a symlink to the particular module from the driver, and/or from the module to the driver, so the list of devices handled by the module and the module name would be accessible. This way, I would know which driver name corresponds to which module name and vice versa. Answer: For PCI drivers, just add the line: .owner = THIS_MODULE, to their struct pci_driver definition and you will get the symlink created for you. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ca0106/ca0106_main.c1
-rw-r--r--sound/pci/emu10k1/emu10k1.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 7e27bfc37439..4a1abb12ee5b 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1390,6 +1390,7 @@ MODULE_DEVICE_TABLE(pci, snd_ca0106_ids);
1390// pci_driver definition 1390// pci_driver definition
1391static struct pci_driver driver = { 1391static struct pci_driver driver = {
1392 .name = "CA0106", 1392 .name = "CA0106",
1393 .owner = THIS_MODULE,
1393 .id_table = snd_ca0106_ids, 1394 .id_table = snd_ca0106_ids,
1394 .probe = snd_ca0106_probe, 1395 .probe = snd_ca0106_probe,
1395 .remove = __devexit_p(snd_ca0106_remove), 1396 .remove = __devexit_p(snd_ca0106_remove),
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index fc377c4b666c..b0e00f0a7c2f 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -223,6 +223,7 @@ static void __devexit snd_card_emu10k1_remove(struct pci_dev *pci)
223 223
224static struct pci_driver driver = { 224static struct pci_driver driver = {
225 .name = "EMU10K1_Audigy", 225 .name = "EMU10K1_Audigy",
226 .owner = THIS_MODULE,
226 .id_table = snd_emu10k1_ids, 227 .id_table = snd_emu10k1_ids,
227 .probe = snd_card_emu10k1_probe, 228 .probe = snd_card_emu10k1_probe,
228 .remove = __devexit_p(snd_card_emu10k1_remove), 229 .remove = __devexit_p(snd_card_emu10k1_remove),