diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-11-19 15:52:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-23 19:32:58 +0000 |
commit | e6cc39486ae74271673742fe86ee6fb8d1eba16c (patch) | |
tree | fd2a3ee4922c852d1a9b3cd9513e228a78602a34 | |
parent | 5b05206b05ba98bce4c8f15200b407569fae270e (diff) | |
download | lwn-e6cc39486ae74271673742fe86ee6fb8d1eba16c.tar.gz lwn-e6cc39486ae74271673742fe86ee6fb8d1eba16c.zip |
serial: amba-pl011: convert not to use dma_request_slave_channel()
dma_request_slave_channel() is deprecated. dma_request_chan() should
be used directly instead.
Switch to the preferred function and update the error handling accordingly.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/6f76e22f77d776d6c1f176d56e7ee341314d8554.1700405529.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 374b4254e39b..bb475c1642fc 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -444,9 +444,9 @@ static void pl011_dma_probe(struct uart_amba_port *uap) dma_chan_name(uap->dmatx.chan)); /* Optionally make use of an RX channel as well */ - chan = dma_request_slave_channel(dev, "rx"); + chan = dma_request_chan(dev, "rx"); - if (!chan && plat && plat->dma_rx_param) { + if (IS_ERR(chan) && plat && plat->dma_rx_param) { chan = dma_request_channel(mask, plat->dma_filter, plat->dma_rx_param); if (!chan) { @@ -455,7 +455,7 @@ static void pl011_dma_probe(struct uart_amba_port *uap) } } - if (chan) { + if (!IS_ERR(chan)) { struct dma_slave_config rx_conf = { .src_addr = uap->port.mapbase + pl011_reg_to_offset(uap, REG_DR), |