]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] create device symlink in snd-aoa
authorOlaf Hering <olaf@aepfle.de>
Thu, 7 Dec 2006 07:24:12 +0000 (08:24 +0100)
committerJaroslav Kysela <perex@suse.cz>
Fri, 9 Feb 2007 08:02:20 +0000 (09:02 +0100)
create sysfs device symlinks for snd-aoa in /sys/class/sound/controlC0 This
allows hald to recognize the device as sound device.  Furthermore it allows
the desktop user to actually access the sound device nodes.  hald and
related packages will modify the acl attributes.
Fixes https://bugzilla.novell.com/show_bug.cgi?id=106294
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/aoa/aoa.h
sound/aoa/core/snd-aoa-alsa.c
sound/aoa/core/snd-aoa-alsa.h
sound/aoa/core/snd-aoa-core.c
sound/aoa/fabrics/snd-aoa-fabric-layout.c

index 378ef1e9879b09753c2b7d8ef5bd7ce4de8fd26a..541b908f3cdf0075feebeb1b00672817adb2dc20 100644 (file)
@@ -99,7 +99,7 @@ struct aoa_fabric {
  * that are not assigned yet are passed to the fabric
  * again for reconsideration. */
 extern int
-aoa_fabric_register(struct aoa_fabric *fabric);
+aoa_fabric_register(struct aoa_fabric *fabric, struct device *dev);
 
 /* it is vital to call this when the fabric exits!
  * When calling, the remove_codec will be called
index 8c5a19bd602afcdff2377e3cafad4e7a39ca5e31..17fe689ed2878d9a3f70dfc10777f19ec4612d9c 100644 (file)
@@ -14,7 +14,7 @@ MODULE_PARM_DESC(index, "index for AOA sound card.");
 
 static struct aoa_card *aoa_card;
 
-int aoa_alsa_init(char *name, struct module *mod)
+int aoa_alsa_init(char *name, struct module *mod, struct device *dev)
 {
        struct snd_card *alsa_card;
        int err;
@@ -28,6 +28,7 @@ int aoa_alsa_init(char *name, struct module *mod)
                return -ENOMEM;
        aoa_card = alsa_card->private_data;
        aoa_card->alsa_card = alsa_card;
+       alsa_card->dev = dev;
        strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver));
        strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname));
        strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname));
index 660d2f1793bb6123d6a35378ad6b0ea03fc430f9..9669e4489cab9f5d3d8c906ad79b7ee6d84af6bd 100644 (file)
@@ -10,7 +10,7 @@
 #define __SND_AOA_ALSA_H
 #include "../aoa.h"
 
-extern int aoa_alsa_init(char *name, struct module *mod);
+extern int aoa_alsa_init(char *name, struct module *mod, struct device *dev);
 extern void aoa_alsa_cleanup(void);
 
 #endif /* __SND_AOA_ALSA_H */
index ecd2d8263f2d5b974e5a8ddbb326cd016a8b7107..19fdae400687eef99eae88b1e1dd9730d91d7ec9 100644 (file)
@@ -82,7 +82,7 @@ void aoa_codec_unregister(struct aoa_codec *codec)
 }
 EXPORT_SYMBOL_GPL(aoa_codec_unregister);
 
-int aoa_fabric_register(struct aoa_fabric *new_fabric)
+int aoa_fabric_register(struct aoa_fabric *new_fabric, struct device *dev)
 {
        struct aoa_codec *c;
        int err;
@@ -98,7 +98,7 @@ int aoa_fabric_register(struct aoa_fabric *new_fabric)
        if (!new_fabric)
                return -EINVAL;
 
-       err = aoa_alsa_init(new_fabric->name, new_fabric->owner);
+       err = aoa_alsa_init(new_fabric->name, new_fabric->owner, dev);
        if (err)
                return err;
 
index 172eb95476c032edbbad972fac59bb68fa2dee9d..4b8e32d1ebf91df8e57283f9f90264eb4af69117 100644 (file)
@@ -1014,7 +1014,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
 
        ldev->gpio.methods->init(&ldev->gpio);
 
-       err = aoa_fabric_register(&layout_fabric);
+       err = aoa_fabric_register(&layout_fabric, &sdev->ofdev.dev);
        if (err && err != -EALREADY) {
                printk(KERN_INFO "snd-aoa-fabric-layout: can't use,"
                                 " another fabric is active!\n");