diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2015-10-14 14:42:51 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-10-14 19:57:11 +0530 |
commit | 7ab388e85faa97a35d520720269e7c8e00ad54a0 (patch) | |
tree | fd86e39dad1274e1ae216f127339d00f1bc2a2ec /arch/arm/mach-davinci/dm355.c | |
parent | b2c843a196b8f5aca74ebabd16c60d59480d6721 (diff) | |
download | blackbird-obmc-linux-7ab388e85faa97a35d520720269e7c8e00ad54a0.tar.gz blackbird-obmc-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/dm355.c')
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index a50bb9c66952..5f10c6695e31 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -613,12 +613,13 @@ static struct resource edma_resources[] = { /* not using (or muxing) TC*_ERR */ }; -static struct platform_device dm355_edma_device = { - .name = "edma", - .id = 0, - .dev.platform_data = &dm355_edma_pdata, - .num_resources = ARRAY_SIZE(edma_resources), - .resource = edma_resources, +static const struct platform_device_info dm355_edma_device __initconst = { + .name = "edma", + .id = 0, + .res = edma_resources, + .num_res = ARRAY_SIZE(edma_resources), + .data = &dm355_edma_pdata, + .size_data = sizeof(dm355_edma_pdata), }; static struct resource dm355_asp1_resources[] = { @@ -1057,13 +1058,18 @@ int __init dm355_init_video(struct vpfe_config *vpfe_cfg, static int __init dm355_init_devices(void) { + struct platform_device *edma_pdev; int ret = 0; if (!cpu_is_davinci_dm355()) return 0; davinci_cfg_reg(DM355_INT_EDMA_CC); - platform_device_register(&dm355_edma_device); + edma_pdev = platform_device_register_full(&dm355_edma_device); + if (IS_ERR(edma_pdev)) { + pr_warn("%s: Failed to register eDMA\n", __func__); + return PTR_ERR(edma_pdev); + } ret = davinci_init_wdt(); if (ret) |