Replace dma_request_slave_channel() by dma_request_chan() as suggested
since the former is deprecated. With this, propagate all possible errors
to the caller.

Reviewed-by: Dave Penkler <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
---
 drivers/gpib/fmh_gpib/fmh_gpib.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpib/fmh_gpib/fmh_gpib.c b/drivers/gpib/fmh_gpib/fmh_gpib.c
index 5e10e9353fed..4ab9b0a317fd 100644
--- a/drivers/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/gpib/fmh_gpib/fmh_gpib.c
@@ -1458,11 +1458,15 @@ static int fmh_gpib_attach_impl(struct gpib_board 
*board, const struct gpib_boar
        e_priv->irq = irq;
 
        if (acquire_dma) {
-               e_priv->dma_channel = dma_request_slave_channel(board->dev, 
"rxtx");
-               if (!e_priv->dma_channel) {
+               struct dma_chan *tmp_chan;
+
+               tmp_chan = dma_request_chan(board->dev, "rxtx");
+               retval = PTR_ERR_OR_ZERO(tmp_chan);
+               if (retval) {
                        dev_err(board->dev, "failed to acquire dma channel 
\"rxtx\".\n");
-                       return -EIO;
+                       return retval;
                }
+               e_priv->dma_channel = tmp_chan;
        }
        /*
         * in the future we might want to know the half-fifo size
-- 
2.50.1


Reply via email to