diff options
author | Barry Song <Baohua.Song@csr.com> | 2013-04-11 02:09:28 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-05-02 11:18:23 -0400 |
commit | 42361f20f29021bfee8d9b5f651362dca83fd705 (patch) | |
tree | 0c91754c3e6f83ff7477ca5ae7476f99b79f272c /drivers/dma/sirf-dma.c | |
parent | 18a1053f7b85acdda2428c9f694101070cb8e62a (diff) |
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 <Renwei.Wu@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/sirf-dma.c')
-rw-r--r-- | drivers/dma/sirf-dma.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 = { | |||
753 | }, | 753 | }, |
754 | }; | 754 | }; |
755 | 755 | ||
756 | module_platform_driver(sirfsoc_dma_driver); | 756 | static __init int sirfsoc_dma_init(void) |
757 | { | ||
758 | return platform_driver_register(&sirfsoc_dma_driver); | ||
759 | } | ||
760 | |||
761 | static void __exit sirfsoc_dma_exit(void) | ||
762 | { | ||
763 | platform_driver_unregister(&sirfsoc_dma_driver); | ||
764 | } | ||
765 | |||
766 | subsys_initcall(sirfsoc_dma_init); | ||
767 | module_exit(sirfsoc_dma_exit); | ||
757 | 768 | ||
758 | MODULE_AUTHOR("Rongjun Ying <rongjun.ying@csr.com>, " | 769 | MODULE_AUTHOR("Rongjun Ying <rongjun.ying@csr.com>, " |
759 | "Barry Song <baohua.song@csr.com>"); | 770 | "Barry Song <baohua.song@csr.com>"); |