serial: sh-sci: Allow AUXDATA DMAC parameters
Subsystems (2)
PATCH 1/5 serial: sh-sci: Allow AUXDATA DMAC parameters
From: Magnus Damm <[email protected]>
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 <[email protected]>
---
drivers/tty/serial/sh-sci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/tty/serial/sh-sci.c +6 -2
@@ -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 ; }