From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 01/05] serial: sh-sci: Allow AUXDATA DMAC parameters
Date: Wed, 25 Jun 2014 00:40:35 +0000 [thread overview]
Message-ID: <20140625004035.18295.42356.sendpatchset@w520> (raw)
From: Magnus Damm <damm+renesas@opensource.se>
Allow passing platform data also in the case of DT. With
this in place it is possible to use AUXDATA together with
platform data to specify DMA channel configuration.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
drivers/tty/serial/sh-sci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- 0001/drivers/tty/serial/sh-sci.c
+++ work/drivers/tty/serial/sh-sci.c 2014-06-25 08:11:20.000000000 +0900
@@ -2470,9 +2470,13 @@ sci_parse_dt(struct platform_device *pde
info = match->data;
- p = devm_kzalloc(&pdev->dev, sizeof(struct plat_sci_port), GFP_KERNEL);
+ if (pdev->dev.platform_data)
+ p = pdev->dev.platform_data;
+ else
+ p = devm_kzalloc(&pdev->dev, sizeof(struct plat_sci_port),
+ GFP_KERNEL);
if (!p) {
- dev_err(&pdev->dev, "failed to allocate DT config data\n");
+ dev_err(&pdev->dev, "failed to get DT config data\n");
return NULL;
}
reply other threads:[~2014-06-25 0:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20140625004035.18295.42356.sendpatchset@w520 \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.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