Skip to content

Commit a08bc4c

Browse files
ozbenhLinus Torvalds
authored andcommitted
[PATCH] aoa: fix when all is built into the kernel
This patch fixes initialisation issues when all of aoa is built into the kernel by re-ordering the link order in the Makefile and making the soundbus use subsys_initcall so it is initialised earlier. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 389ba79 commit a08bc4c

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎sound/aoa/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
obj-$(CONFIG_SND_AOA) += core/
2-
obj-$(CONFIG_SND_AOA) += codecs/
3-
obj-$(CONFIG_SND_AOA) += fabrics/
42
obj-$(CONFIG_SND_AOA_SOUNDBUS) += soundbus/
3+
obj-$(CONFIG_SND_AOA) += fabrics/
4+
obj-$(CONFIG_SND_AOA) += codecs/

‎sound/aoa/soundbus/core.c‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,6 @@ static struct bus_type soundbus_bus_type = {
194194
.dev_attrs = soundbus_dev_attrs,
195195
};
196196

197-
static int __init soundbus_init(void)
198-
{
199-
return bus_register(&soundbus_bus_type);
200-
}
201-
202-
static void __exit soundbus_exit(void)
203-
{
204-
bus_unregister(&soundbus_bus_type);
205-
}
206-
207197
int soundbus_add_one(struct soundbus_dev *dev)
208198
{
209199
static int devcount;
@@ -246,5 +236,15 @@ void soundbus_unregister_driver(struct soundbus_driver *drv)
246236
}
247237
EXPORT_SYMBOL_GPL(soundbus_unregister_driver);
248238

249-
module_init(soundbus_init);
239+
static int __init soundbus_init(void)
240+
{
241+
return bus_register(&soundbus_bus_type);
242+
}
243+
244+
static void __exit soundbus_exit(void)
245+
{
246+
bus_unregister(&soundbus_bus_type);
247+
}
248+
249+
subsys_initcall(soundbus_init);
250250
module_exit(soundbus_exit);

0 commit comments

Comments
 (0)