提交 26074962 编写于 作者: N Nicolas Pitre 提交者: Pierre Ossman

mmc: initialize mmc subsystem with subsys_initcall()

The problem is that the sdio_bus must be registered before any SDIO
drivers are registered against it otherwise the kernel sulks.  Because
the sdio_bus registration happens through module_init (equivalent to
device_initcall), then any SDIO
drivers linked before the SDIO core code in the kernel will be initialized
first.

Upcoming SDIO function drivers are likely to be located outside the
drivers/mmc directory as it is common practice to group drivers according
to their function rather than the bus they use.  SDIO drivers are therefore
likely to appear at random location in the kernel link.

To make sure the sdio_bus is always initialized before any SDIO drivers,
let's move the MMC init to the subsys_initcall level.
Signed-off-by: NNicolas Pitre <npitre@mvista.com>
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
上级 1a632f8c
...@@ -771,7 +771,7 @@ static void __exit mmc_exit(void) ...@@ -771,7 +771,7 @@ static void __exit mmc_exit(void)
destroy_workqueue(workqueue); destroy_workqueue(workqueue);
} }
module_init(mmc_init); subsys_initcall(mmc_init);
module_exit(mmc_exit); module_exit(mmc_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册