From: Jon Hunter Date: Tue, 5 May 2015 14:17:58 +0000 (+0100) Subject: serial: tegra: Correct shutdown of UARTs X-Git-Tag: omap-for-v4.2/wakeirq-drivers-v2^2~68 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d92aca3a76662d2da8fe843ab124c45b47ea127d;p=pandora-kernel.git serial: tegra: Correct shutdown of UARTs There are two issues in the shutdown path of the UARTs which are: 1. The function tegra_uart_shutdown() calls tegra_uart_flush_buffer() to stop DMA TX transfers. However, tegra_uart_flush_buffer() is called after the DMA channels have already been freed and so actually does nothing. 2. The function that frees the DMA channels (tegra_uart_dma_channel_free()), unmaps the dma buffer before freeing the DMA channel and does not ensure the DMA has been stopped. Resolve this by fixing the code in tegra_uart_dma_channel_free() to ensure the DMA is stopped, free the DMA channel and then unmap the DMA buffer. Finally, remove the unnecessary call to tegra_uart_flush_buffer(). Signed-off-by: Jon Hunter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed