diff mbox

[01/05] serial: sh-sci: Allow AUXDATA DMAC parameters

Message ID 20140625004035.18295.42356.sendpatchset@w520 (mailing list archive)
State RFC
Headers show

Commit Message

Magnus Damm June 25, 2014, 12:40 a.m. UTC
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(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 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;
 	}