]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mmc: initialize mmc subsystem with subsys_initcall()
authorNicolas Pitre <nico@cam.org>
Sat, 16 Jun 2007 06:07:53 +0000 (02:07 -0400)
committerPierre Ossman <drzeus@drzeus.cx>
Sun, 23 Sep 2007 18:45:39 +0000 (20:45 +0200)
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>
drivers/mmc/core/core.c

index 9747455928daa96129d975d1da1773b72833069b..b8f27e5ade97a3eb0ff417c4fad987ee9dc711de 100644 (file)
@@ -771,7 +771,7 @@ static void __exit mmc_exit(void)
        destroy_workqueue(workqueue);
 }
 
-module_init(mmc_init);
+subsys_initcall(mmc_init);
 module_exit(mmc_exit);
 
 MODULE_LICENSE("GPL");