summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTang Bin <tangbin@cmss.chinamobile.com>2021-08-14 20:49:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-16 18:52:59 +0200
commit59bd4eedf118a0404631038ece6f6a436b98c256 (patch)
treef411229fbd7c56364c163d1dcb5128ca1b68761e /drivers
parent94560f6156fed8ddb0dfc93620382fadf02d90d0 (diff)
downloadlinux-stable-59bd4eedf118a0404631038ece6f6a436b98c256.tar.gz
linux-stable-59bd4eedf118a0404631038ece6f6a436b98c256.tar.bz2
linux-stable-59bd4eedf118a0404631038ece6f6a436b98c256.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/stm32-usart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 090822cd1604..99f9038dda5d 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -1177,7 +1177,7 @@ static int stm32_usart_of_dma_rx_probe(struct stm32_port *stm32port,
if (uart_console(port))
return -ENODEV;
- stm32port->rx_buf = dma_alloc_coherent(&pdev->dev, RX_BUF_L,
+ stm32port->rx_buf = dma_alloc_coherent(dev, RX_BUF_L,
&stm32port->rx_dma_buf,
GFP_KERNEL);
if (!stm32port->rx_buf)
@@ -1243,7 +1243,7 @@ static int stm32_usart_of_dma_tx_probe(struct stm32_port *stm32port,
stm32port->tx_dma_busy = false;
- stm32port->tx_buf = dma_alloc_coherent(&pdev->dev, TX_BUF_L,
+ stm32port->tx_buf = dma_alloc_coherent(dev, TX_BUF_L,
&stm32port->tx_dma_buf,
GFP_KERNEL);
if (!stm32port->tx_buf)