diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-11-19 19:00:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-23 19:33:03 +0000 |
commit | f1c7f92ee9ec38aa5e6526257a8a9f1fffc52511 (patch) | |
tree | 1b2a4d2963310bfe02046cd1441c689ea356625a /drivers/tty/serial | |
parent | b49c36e4b2ff4d5c8b8a0495f660707ae7dfdda9 (diff) | |
download | linux-stable-f1c7f92ee9ec38aa5e6526257a8a9f1fffc52511.tar.gz linux-stable-f1c7f92ee9ec38aa5e6526257a8a9f1fffc52511.tar.bz2 linux-stable-f1c7f92ee9ec38aa5e6526257a8a9f1fffc52511.zip |
serial: sh-sci: 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/d6773b9bd88dbbbea06bc6d5cd59aa117b1ee2ee.1700416841.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 745023001510..a85e7b9a2e49 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1558,10 +1558,9 @@ static struct dma_chan *sci_request_dma_chan(struct uart_port *port, struct dma_slave_config cfg; int ret; - chan = dma_request_slave_channel(port->dev, - dir == DMA_MEM_TO_DEV ? "tx" : "rx"); - if (!chan) { - dev_dbg(port->dev, "dma_request_slave_channel failed\n"); + chan = dma_request_chan(port->dev, dir == DMA_MEM_TO_DEV ? "tx" : "rx"); + if (IS_ERR(chan)) { + dev_dbg(port->dev, "dma_request_chan failed\n"); return NULL; } |