Message ID | 20140625004035.18295.42356.sendpatchset@w520 (mailing list archive) |
---|---|
State | RFC |
Headers | show |
--- 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; }