* [PATCH 01/05] serial: sh-sci: Allow AUXDATA DMAC parameters
@ 2014-06-25 0:40 Magnus Damm
0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2014-06-25 0:40 UTC (permalink / raw)
To: linux-sh
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-25 0:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25 0:40 [PATCH 01/05] serial: sh-sci: Allow AUXDATA DMAC parameters Magnus Damm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).