summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-04-22 09:21:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-18 16:34:55 +0200
commitd1e06a4392d0e65f92d3e8c7020061aaeceed502 (patch)
treef754f4219374aa2220af312102497dba4fa01cf5 /drivers/tty
parent2b5cf14bd0c82164eb3689dd4cfb67a78a23302c (diff)
downloadop-kernel-dev-d1e06a4392d0e65f92d3e8c7020061aaeceed502.zip
op-kernel-dev-d1e06a4392d0e65f92d3e8c7020061aaeceed502.tar.gz
serial: pch_uart: use offset_in_page() macro
Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/pch_uart.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 42caccb..d3796dc 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -878,8 +878,7 @@ static int dma_handle_rx(struct eg20t_port *priv)
sg_dma_len(sg) = priv->trigger_level;
sg_set_page(&priv->sg_rx, virt_to_page(priv->rx_buf_virt),
- sg_dma_len(sg), (unsigned long)priv->rx_buf_virt &
- ~PAGE_MASK);
+ sg_dma_len(sg), offset_in_page(priv->rx_buf_virt));
sg_dma_address(sg) = priv->rx_buf_dma;
OpenPOWER on IntegriCloud