From: Phil Edworthy <phil.edworthy@xxxxxxxxxxx> The 8250 driver is quite flexible. Regarding DMA handling, there is the possibility to either use the default helper (serial8250_tx_dma()) or call a specific function. Only the omap and brcm implementation do that. In both cases, they don't use the serial8250_tx_dma() helper at all. As we are going to write a new DMA handling function for the RZ/N1 SoCs which will use the serial8250_tx_dma() implementation (preceded by a couple of register writes), we need the ->tx_dma() pointer to link to our own function, but within the __dma_tx_complete() helper we also need to call our own implementation instead of the default one directly. In order to do that, let's call ->tx_dma() instead of serial8250_tx_dma() from __dma_tx_complete(). Signed-off-by: Phil Edworthy <phil.edworthy@xxxxxxxxxxx> [miquel.raynal@xxxxxxxxxxx: Re-write commit message] Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> --- drivers/tty/serial/8250/8250_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c index 890fa7ddaa7f..a0563f2341ac 100644 --- a/drivers/tty/serial/8250/8250_dma.c +++ b/drivers/tty/serial/8250/8250_dma.c @@ -33,7 +33,7 @@ static void __dma_tx_complete(void *param) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(&p->port); - ret = serial8250_tx_dma(p); + ret = dma->tx_dma(p); if (ret) serial8250_set_THRI(p); -- 2.27.0