dw_dmac: Replace module_init() with subsys_initcall()
authorViresh Kumar <viresh.kumar@st.com>
Thu, 3 Mar 2011 10:17:15 +0000 (15:47 +0530)
committerVinod Koul <vinod.koul@intel.com>
Sun, 6 Mar 2011 19:42:27 +0000 (01:12 +0530)
In some cases users of dw_dmac are initialized before dw_dmac, and if they try
to use dw_dmac, they simply fail. So its better we register init() routine
of driver using subsys_initcall() instead of module_init(), so that dma driver
is available at the earliest possible.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dw_dmac.c

index 08dab3b..064a183 100644 (file)
@@ -1455,7 +1455,7 @@ static int __init dw_init(void)
 {
        return platform_driver_probe(&dw_driver, dw_probe);
 }
-module_init(dw_init);
+subsys_initcall(dw_init);
 
 static void __exit dw_exit(void)
 {