From: Barry Song Date: Thu, 11 Apr 2013 06:09:28 +0000 (+0800) Subject: dmaengine: sirf: move driver init from module_init to subsys_initcall X-Git-Tag: firefly_0821_release~3680^2~523^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=42361f20f29021bfee8d9b5f651362dca83fd705;p=firefly-linux-kernel-4.4.55.git dmaengine: sirf: move driver init from module_init to subsys_initcall if we initilize dma driver by module_init, there are still many devices which will be initilized earlier than dma. these devices will fail to get dma channel. this moves dmaengine earlier than device_initcall and make dma available for all devices. Reported-by: Renwei Wu Signed-off-by: Barry Song Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index c4395294dc51..1765a0a2736d 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -753,7 +753,18 @@ static struct platform_driver sirfsoc_dma_driver = { }, }; -module_platform_driver(sirfsoc_dma_driver); +static __init int sirfsoc_dma_init(void) +{ + return platform_driver_register(&sirfsoc_dma_driver); +} + +static void __exit sirfsoc_dma_exit(void) +{ + platform_driver_unregister(&sirfsoc_dma_driver); +} + +subsys_initcall(sirfsoc_dma_init); +module_exit(sirfsoc_dma_exit); MODULE_AUTHOR("Rongjun Ying , " "Barry Song ");