]> git.itanic.dy.fi Git - linux-stable/commitdiff
serial: sh-sci: convert not to use dma_request_slave_channel()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 19 Nov 2023 18:00:58 +0000 (19:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Nov 2023 19:33:03 +0000 (19:33 +0000)
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>
drivers/tty/serial/sh-sci.c

index 745023001510ab2bde0a70f2c76a91920229a6bc..a85e7b9a2e492391ae7a5c6560bc4b2d31ed96fb 100644 (file)
@@ -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;
        }