aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/aoa/aoa.h2
-rw-r--r--sound/aoa/core/snd-aoa-alsa.c3
-rw-r--r--sound/aoa/core/snd-aoa-alsa.h2
-rw-r--r--sound/aoa/core/snd-aoa-core.c4
-rw-r--r--sound/aoa/fabrics/snd-aoa-fabric-layout.c2
5 files changed, 7 insertions, 6 deletions
diff --git a/sound/aoa/aoa.h b/sound/aoa/aoa.h
index 378ef1e9879b..541b908f3cdf 100644
--- a/sound/aoa/aoa.h
+++ b/sound/aoa/aoa.h
@@ -99,7 +99,7 @@ struct aoa_fabric {
99 * that are not assigned yet are passed to the fabric 99 * that are not assigned yet are passed to the fabric
100 * again for reconsideration. */ 100 * again for reconsideration. */
101extern int 101extern int
102aoa_fabric_register(struct aoa_fabric *fabric); 102aoa_fabric_register(struct aoa_fabric *fabric, struct device *dev);
103 103
104/* it is vital to call this when the fabric exits! 104/* it is vital to call this when the fabric exits!
105 * When calling, the remove_codec will be called 105 * When calling, the remove_codec will be called
diff --git a/sound/aoa/core/snd-aoa-alsa.c b/sound/aoa/core/snd-aoa-alsa.c
index 8c5a19bd602a..17fe689ed287 100644
--- a/sound/aoa/core/snd-aoa-alsa.c
+++ b/sound/aoa/core/snd-aoa-alsa.c
@@ -14,7 +14,7 @@ MODULE_PARM_DESC(index, "index for AOA sound card.");
14 14
15static struct aoa_card *aoa_card; 15static struct aoa_card *aoa_card;
16 16
17int aoa_alsa_init(char *name, struct module *mod) 17int aoa_alsa_init(char *name, struct module *mod, struct device *dev)
18{ 18{
19 struct snd_card *alsa_card; 19 struct snd_card *alsa_card;
20 int err; 20 int err;
@@ -28,6 +28,7 @@ int aoa_alsa_init(char *name, struct module *mod)
28 return -ENOMEM; 28 return -ENOMEM;
29 aoa_card = alsa_card->private_data; 29 aoa_card = alsa_card->private_data;
30 aoa_card->alsa_card = alsa_card; 30 aoa_card->alsa_card = alsa_card;
31 alsa_card->dev = dev;
31 strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver)); 32 strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver));
32 strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname)); 33 strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname));
33 strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname)); 34 strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname));
diff --git a/sound/aoa/core/snd-aoa-alsa.h b/sound/aoa/core/snd-aoa-alsa.h
index 660d2f1793bb..9669e4489cab 100644
--- a/sound/aoa/core/snd-aoa-alsa.h
+++ b/sound/aoa/core/snd-aoa-alsa.h
@@ -10,7 +10,7 @@
10#define __SND_AOA_ALSA_H 10#define __SND_AOA_ALSA_H
11#include "../aoa.h" 11#include "../aoa.h"
12 12
13extern int aoa_alsa_init(char *name, struct module *mod); 13extern int aoa_alsa_init(char *name, struct module *mod, struct device *dev);
14extern void aoa_alsa_cleanup(void); 14extern void aoa_alsa_cleanup(void);
15 15
16#endif /* __SND_AOA_ALSA_H */ 16#endif /* __SND_AOA_ALSA_H */
diff --git a/sound/aoa/core/snd-aoa-core.c b/sound/aoa/core/snd-aoa-core.c
index ecd2d8263f2d..19fdae400687 100644
--- a/sound/aoa/core/snd-aoa-core.c
+++ b/sound/aoa/core/snd-aoa-core.c
@@ -82,7 +82,7 @@ void aoa_codec_unregister(struct aoa_codec *codec)
82} 82}
83EXPORT_SYMBOL_GPL(aoa_codec_unregister); 83EXPORT_SYMBOL_GPL(aoa_codec_unregister);
84 84
85int aoa_fabric_register(struct aoa_fabric *new_fabric) 85int aoa_fabric_register(struct aoa_fabric *new_fabric, struct device *dev)
86{ 86{
87 struct aoa_codec *c; 87 struct aoa_codec *c;
88 int err; 88 int err;
@@ -98,7 +98,7 @@ int aoa_fabric_register(struct aoa_fabric *new_fabric)
98 if (!new_fabric) 98 if (!new_fabric)
99 return -EINVAL; 99 return -EINVAL;
100 100
101 err = aoa_alsa_init(new_fabric->name, new_fabric->owner); 101 err = aoa_alsa_init(new_fabric->name, new_fabric->owner, dev);
102 if (err) 102 if (err)
103 return err; 103 return err;
104 104
diff --git a/sound/aoa/fabrics/snd-aoa-fabric-layout.c b/sound/aoa/fabrics/snd-aoa-fabric-layout.c
index 172eb95476c0..4b8e32d1ebf9 100644
--- a/sound/aoa/fabrics/snd-aoa-fabric-layout.c
+++ b/sound/aoa/fabrics/snd-aoa-fabric-layout.c
@@ -1014,7 +1014,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
1014 1014
1015 ldev->gpio.methods->init(&ldev->gpio); 1015 ldev->gpio.methods->init(&ldev->gpio);
1016 1016
1017 err = aoa_fabric_register(&layout_fabric); 1017 err = aoa_fabric_register(&layout_fabric, &sdev->ofdev.dev);
1018 if (err && err != -EALREADY) { 1018 if (err && err != -EALREADY) {
1019 printk(KERN_INFO "snd-aoa-fabric-layout: can't use," 1019 printk(KERN_INFO "snd-aoa-fabric-layout: can't use,"
1020 " another fabric is active!\n"); 1020 " another fabric is active!\n");