mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 14:43:58 +08:00
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>
This commit is contained in:
parent
2b5cf14bd0
commit
d1e06a4392
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user