From: Sonic Zhang Date: Fri, 21 Dec 2007 09:03:39 +0000 (+0800) Subject: [Blackfin] serial driver: Fix bug Free rx dma buffer in shutdown. X-Git-Tag: v3.12-rc1~22640^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75b780bd99b851682289e7a88763ede5a936edb0;p=kernel%2Fkernel-generic.git [Blackfin] serial driver: Fix bug Free rx dma buffer in shutdown. Kernel crash for the serial driver in DMA mode: http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3679 Signed-off-by: Sonic Zhang Signed-off-by: Bryan Wu --- diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 3a2aa7e..838f491 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c @@ -704,6 +704,7 @@ static void bfin_serial_shutdown(struct uart_port *port) disable_dma(uart->rx_dma_channel); free_dma(uart->rx_dma_channel); del_timer(&(uart->rx_dma_timer)); + dma_free_coherent(NULL, PAGE_SIZE, uart->rx_dma_buf.buf, 0); #else #ifdef CONFIG_KGDB_UART if (uart->port.line != CONFIG_KGDB_UART_PORT)