Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: stm32: use the defined variable to simplify code

Use the defined variable 'dev' to make the code cleaner.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210814124951.30084-1-tangbin@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Tang Bin and committed by
Greg Kroah-Hartman
59bd4eed 94560f61

+2 -2
+2 -2
drivers/tty/serial/stm32-usart.c
··· 1177 1177 if (uart_console(port)) 1178 1178 return -ENODEV; 1179 1179 1180 - stm32port->rx_buf = dma_alloc_coherent(&pdev->dev, RX_BUF_L, 1180 + stm32port->rx_buf = dma_alloc_coherent(dev, RX_BUF_L, 1181 1181 &stm32port->rx_dma_buf, 1182 1182 GFP_KERNEL); 1183 1183 if (!stm32port->rx_buf) ··· 1243 1243 1244 1244 stm32port->tx_dma_busy = false; 1245 1245 1246 - stm32port->tx_buf = dma_alloc_coherent(&pdev->dev, TX_BUF_L, 1246 + stm32port->tx_buf = dma_alloc_coherent(dev, TX_BUF_L, 1247 1247 &stm32port->tx_dma_buf, 1248 1248 GFP_KERNEL); 1249 1249 if (!stm32port->tx_buf)