From: amery@hanoverdisplays.com (Alejandro Mery)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA
Date: Tue, 5 Dec 2017 12:34:56 +0000 [thread overview]
Message-ID: <20171205123458.97837-2-amery@hanoverdisplays.com> (raw)
In-Reply-To: <20171205123458.97837-1-amery@hanoverdisplays.com>
as it was done by 7ab388e85faa97a35d520720269e7c8e00ad54a0 for other davinci SoCs
changes since v1:
* fix typo
Signed-off-by: Alejandro Mery <amery@hanoverdisplays.com>
---
arch/arm/mach-davinci/dm365.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 8be04ec95adf..9bd17bc77b5c 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -925,12 +925,13 @@ static struct resource edma_resources[] = {
/* not using TC*_ERR */
};
-static struct platform_device dm365_edma_device = {
- .name = "edma",
- .id = 0,
- .dev.platform_data = &dm365_edma_pdata,
- .num_resources = ARRAY_SIZE(edma_resources),
- .resource = edma_resources,
+static const struct platform_device_info dm365_edma_device __initconst = {
+ .name = "edma",
+ .id = 0,
+ .res = edma_resources,
+ .num_res = ARRAY_SIZE(edma_resources),
+ .data = &dm365_edma_pdata,
+ .size_data = sizeof(dm365_edma_pdata),
};
static struct resource dm365_asp_resources[] = {
@@ -1428,13 +1429,18 @@ int __init dm365_init_video(struct vpfe_config *vpfe_cfg,
static int __init dm365_init_devices(void)
{
+ struct platform_device *edma_pdev;
int ret = 0;
if (!cpu_is_davinci_dm365())
return 0;
davinci_cfg_reg(DM365_INT_EDMA_CC);
- platform_device_register(&dm365_edma_device);
+ edma_pdev = platform_device_register_full(&dm365_edma_device);
+ if (IS_ERR(edma_pdev)) {
+ pr_warn("%s: Failed to register eDMA\n", __func__);
+ return PTR_ERR(edma_pdev);
+ }
platform_device_register(&dm365_mdio_device);
platform_device_register(&dm365_emac_device);
--
2.15.0
next prev parent reply other threads:[~2017-12-05 12:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 13:33 [PATCH 0/2] ARM: davinci: fix eDMA probing for dm365 Alejandro Mery
2017-12-04 13:33 ` [PATCH 1/2] ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA Alejandro Mery
2017-12-04 13:33 ` [PATCH 2/2] ARM: davinci: Add dma_mask to dm365's eDMA device Alejandro Mery
2017-12-05 12:31 ` [PATCH 0/2] ARM: davinci: fix eDMA probing for dm365 Peter Ujfalusi
2017-12-05 12:34 ` [PATCH v2 0/3] ARM: davinci: fix eDMA for DM365 Alejandro Mery
2017-12-05 12:34 ` Alejandro Mery [this message]
2017-12-07 5:57 ` [PATCH v2 1/3] ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA Sekhar Nori
2017-12-05 12:34 ` [PATCH v2 2/3] ARM: davinci: Add dma_mask to dm365's eDMA device Alejandro Mery
2017-12-07 6:03 ` Sekhar Nori
2017-12-05 12:34 ` [PATCH v2 3/3] ARM: davinci: fix mmc entries in DM365's eDMA slaves table Alejandro Mery
2017-12-07 6:10 ` Sekhar Nori
2017-12-07 6:16 ` [PATCH v2 0/3] ARM: davinci: fix eDMA for DM365 Sekhar Nori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171205123458.97837-2-amery@hanoverdisplays.com \
--to=amery@hanoverdisplays.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox