aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/omap-dma.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2013-01-11 14:24:19 -0500
committerTony Lindgren <tony@atomide.com>2013-01-11 14:24:19 -0500
commitbe1f94812c2cc0aaf696d39fe23104763ea52b5b (patch)
tree2f9789af80ad91ad976a824548c0c2aa4d9b591f /drivers/dma/omap-dma.c
parenta6cf912c6047077a6eb860ed8dbfa342376ee395 (diff)
ARM: OMAP: Fix dmaengine init for multiplatform
Otherwise omap dmaengine will initialized when booted on other SoCs. Fix this by initializing the platform device in arch/arm/*omap*/dma.c instead. Cc: Russell King <linux@arm.linux.org.uk> Cc: Dan Williams <djbw@fb.com> Cc: Vinod Koul <vinod.koul@intel.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/dma/omap-dma.c')
-rw-r--r--drivers/dma/omap-dma.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index 5a31264f2bd1..c4b4fd2acc42 100644
--- a/drivers/dma/omap-dma.c
+++ b/drivers/dma/omap-dma.c
@@ -661,32 +661,14 @@ bool omap_dma_filter_fn(struct dma_chan *chan, void *param)
661} 661}
662EXPORT_SYMBOL_GPL(omap_dma_filter_fn); 662EXPORT_SYMBOL_GPL(omap_dma_filter_fn);
663 663
664static struct platform_device *pdev;
665
666static const struct platform_device_info omap_dma_dev_info = {
667 .name = "omap-dma-engine",
668 .id = -1,
669 .dma_mask = DMA_BIT_MASK(32),
670};
671
672static int omap_dma_init(void) 664static int omap_dma_init(void)
673{ 665{
674 int rc = platform_driver_register(&omap_dma_driver); 666 return platform_driver_register(&omap_dma_driver);
675
676 if (rc == 0) {
677 pdev = platform_device_register_full(&omap_dma_dev_info);
678 if (IS_ERR(pdev)) {
679 platform_driver_unregister(&omap_dma_driver);
680 rc = PTR_ERR(pdev);
681 }
682 }
683 return rc;
684} 667}
685subsys_initcall(omap_dma_init); 668subsys_initcall(omap_dma_init);
686 669
687static void __exit omap_dma_exit(void) 670static void __exit omap_dma_exit(void)
688{ 671{
689 platform_device_unregister(pdev);
690 platform_driver_unregister(&omap_dma_driver); 672 platform_driver_unregister(&omap_dma_driver);
691} 673}
692module_exit(omap_dma_exit); 674module_exit(omap_dma_exit);