From: Brian King Date: Mon, 13 Nov 2006 22:32:36 +0000 (-0600) Subject: [PATCH] libata: Convert from module_init to subsys_initcall X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a4625085445b86951d8482c0cdd6d52719f7c323;p=openwrt%2Fstaging%2Fblogic.git [PATCH] libata: Convert from module_init to subsys_initcall When building a monolithic kernel, the load order of drivers does not work for SAS libata users, resulting in a kernel oops. Convert libata to use subsys_initcall instead of module_init, which ensures that libata gets loaded before any LLDD. This is the same thing that scsi core does to solve the problem. The load order problem was observed on ipr SAS adapters and should exist for other SAS users as well. Signed-off-by: Brian King Acked-by: Jeff Garzik Signed-off-by: Linus Torvalds --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index a8fd0c3e59b3..915a55a6cc14 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5957,7 +5957,7 @@ static void __exit ata_exit(void) destroy_workqueue(ata_aux_wq); } -module_init(ata_init); +subsys_initcall(ata_init); module_exit(ata_exit); static unsigned long ratelimit_time;