summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm646x.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2015-10-14 14:42:51 +0300
committerVinod Koul <vinod.koul@intel.com>2015-10-14 19:57:11 +0530
commit7ab388e85faa97a35d520720269e7c8e00ad54a0 (patch)
treefd86e39dad1274e1ae216f127339d00f1bc2a2ec /arch/arm/mach-davinci/dm646x.c
parentb2c843a196b8f5aca74ebabd16c60d59480d6721 (diff)
downloadlinux-7ab388e85faa97a35d520720269e7c8e00ad54a0.tar.gz
linux-7ab388e85faa97a35d520720269e7c8e00ad54a0.tar.bz2
linux-7ab388e85faa97a35d520720269e7c8e00ad54a0.zip
ARM: davinci: Use platform_device_register_full() to create pdev for eDMA
Convert the eDMA platform device creation to use struct platform_device_info XXXXXX __initconst and platform_device_register_full() This will allow us to cleanly specify the dma_mask for the devices in an upcoming patch. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm646x.c')
-rw-r--r--arch/arm/mach-davinci/dm646x.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 219ebc8f674a..79c1d8917dd3 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -589,12 +589,13 @@ static struct resource edma_resources[] = {
/* not using TC*_ERR */
};
-static struct platform_device dm646x_edma_device = {
- .name = "edma",
- .id = 0,
- .dev.platform_data = &dm646x_edma_pdata,
- .num_resources = ARRAY_SIZE(edma_resources),
- .resource = edma_resources,
+static const struct platform_device_info dm646x_edma_device __initconst = {
+ .name = "edma",
+ .id = 0,
+ .res = edma_resources,
+ .num_res = ARRAY_SIZE(edma_resources),
+ .data = &dm646x_edma_pdata,
+ .size_data = sizeof(dm646x_edma_pdata),
};
static struct resource dm646x_mcasp0_resources[] = {
@@ -931,9 +932,12 @@ void dm646x_setup_vpif(struct vpif_display_config *display_config,
int __init dm646x_init_edma(struct edma_rsv_info *rsv)
{
+ struct platform_device *edma_pdev;
+
dm646x_edma_pdata.rsv = rsv;
- return platform_device_register(&dm646x_edma_device);
+ edma_pdev = platform_device_register_full(&dm646x_edma_device);
+ return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0;
}
void __init dm646x_init(void)