Previously, this caused NULL to sometimes be passed as a device
to the DMA code. With recent DMA changes, that now causes a BUG().
Signed-off-by: Scott Wood <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
dev_set_drvdata(&ofdev->dev, pinfo);
+ /* initialize the device pointer for the port */
+ pinfo->port.dev = &ofdev->dev;
+
ret = cpm_uart_init_port(ofdev->node, pinfo);
if (ret)
return ret;
- /* initialize the device pointer for the port */
- pinfo->port.dev = &ofdev->dev;
-
return uart_add_one_port(&cpm_reg, &pinfo->port);
}