diff options
author | Nicolas Pitre <nico@cam.org> | 2007-06-16 02:07:53 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 14:45:39 -0400 |
commit | 26074962e8f547b96614dbe248748ba2a1996ca3 (patch) | |
tree | b1ae5800aaae3bc9872886c825431d8ae25b52ce /drivers/mmc | |
parent | 1a632f8cdc33e7f8edca352164f0c96a75d08f08 (diff) |
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: Nicolas Pitre <npitre@mvista.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 9747455928da..b8f27e5ade97 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -771,7 +771,7 @@ static void __exit mmc_exit(void) | |||
771 | destroy_workqueue(workqueue); | 771 | destroy_workqueue(workqueue); |
772 | } | 772 | } |
773 | 773 | ||
774 | module_init(mmc_init); | 774 | subsys_initcall(mmc_init); |
775 | module_exit(mmc_exit); | 775 | module_exit(mmc_exit); |
776 | 776 | ||
777 | MODULE_LICENSE("GPL"); | 777 | MODULE_LICENSE("GPL"); |