From 05b733203f5b369a5f6444f5c8587a500bbaa223 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 7 Dec 2006 08:24:12 +0100 Subject: [PATCH] --- yaml --- r: 47141 b: refs/heads/master c: 61e77107fa849b69f50ebe96217ba3468a216ba8 h: refs/heads/master i: 47139: d193fe575ac11917b0daf817395dd8f8729759cf v: v3 --- [refs] | 2 +- trunk/sound/aoa/aoa.h | 2 +- trunk/sound/aoa/core/snd-aoa-alsa.c | 3 ++- trunk/sound/aoa/core/snd-aoa-alsa.h | 2 +- trunk/sound/aoa/core/snd-aoa-core.c | 4 ++-- trunk/sound/aoa/fabrics/snd-aoa-fabric-layout.c | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 5855219f9f30..adea14d4af63 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e0e6ce0380e0c4de35371372bc5b6c2b02458597 +refs/heads/master: 61e77107fa849b69f50ebe96217ba3468a216ba8 diff --git a/trunk/sound/aoa/aoa.h b/trunk/sound/aoa/aoa.h index 378ef1e9879b..541b908f3cdf 100644 --- a/trunk/sound/aoa/aoa.h +++ b/trunk/sound/aoa/aoa.h @@ -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 diff --git a/trunk/sound/aoa/core/snd-aoa-alsa.c b/trunk/sound/aoa/core/snd-aoa-alsa.c index 8c5a19bd602a..17fe689ed287 100644 --- a/trunk/sound/aoa/core/snd-aoa-alsa.c +++ b/trunk/sound/aoa/core/snd-aoa-alsa.c @@ -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)); diff --git a/trunk/sound/aoa/core/snd-aoa-alsa.h b/trunk/sound/aoa/core/snd-aoa-alsa.h index 660d2f1793bb..9669e4489cab 100644 --- a/trunk/sound/aoa/core/snd-aoa-alsa.h +++ b/trunk/sound/aoa/core/snd-aoa-alsa.h @@ -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 */ diff --git a/trunk/sound/aoa/core/snd-aoa-core.c b/trunk/sound/aoa/core/snd-aoa-core.c index ecd2d8263f2d..19fdae400687 100644 --- a/trunk/sound/aoa/core/snd-aoa-core.c +++ b/trunk/sound/aoa/core/snd-aoa-core.c @@ -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; diff --git a/trunk/sound/aoa/fabrics/snd-aoa-fabric-layout.c b/trunk/sound/aoa/fabrics/snd-aoa-fabric-layout.c index 172eb95476c0..4b8e32d1ebf9 100644 --- a/trunk/sound/aoa/fabrics/snd-aoa-fabric-layout.c +++ b/trunk/sound/aoa/fabrics/snd-aoa-fabric-layout.c @@ -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");