diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2020-01-09 10:31:46 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-14 21:46:47 +0100 |
commit | 7b73a9c8e26ce5769c41d4b787767c10fe7269db (patch) | |
tree | 3102c08d12e5f94678e98ac0c80ac76f32f0cf4f /drivers/slimbus | |
parent | 884a90bdf42bf15b1d07b88b72d93c955eb19ad9 (diff) | |
download | linux-next-7b73a9c8e26ce5769c41d4b787767c10fe7269db.tar.gz |
slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel()
dma_request_slave_channel() is a wrapper on top of dma_request_chan()
eating up the error code.
By using dma_request_chan() directly the driver can support deferred
probing against DMA.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200109103148.5612-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/slimbus')
-rw-r--r-- | drivers/slimbus/qcom-ngd-ctrl.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 29fbab55c3b3..e3f5ebc0c05e 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -666,10 +666,12 @@ static int qcom_slim_ngd_init_rx_msgq(struct qcom_slim_ngd_ctrl *ctrl) struct device *dev = ctrl->dev; int ret, size; - ctrl->dma_rx_channel = dma_request_slave_channel(dev, "rx"); - if (!ctrl->dma_rx_channel) { - dev_err(dev, "Failed to request dma channels"); - return -EINVAL; + ctrl->dma_rx_channel = dma_request_chan(dev, "rx"); + if (IS_ERR(ctrl->dma_rx_channel)) { + dev_err(dev, "Failed to request RX dma channel"); + ret = PTR_ERR(ctrl->dma_rx_channel); + ctrl->dma_rx_channel = NULL; + return ret; } size = QCOM_SLIM_NGD_DESC_NUM * SLIM_MSGQ_BUF_LEN; @@ -703,10 +705,12 @@ static int qcom_slim_ngd_init_tx_msgq(struct qcom_slim_ngd_ctrl *ctrl) int ret = 0; int size; - ctrl->dma_tx_channel = dma_request_slave_channel(dev, "tx"); - if (!ctrl->dma_tx_channel) { - dev_err(dev, "Failed to request dma channels"); - return -EINVAL; + ctrl->dma_tx_channel = dma_request_chan(dev, "tx"); + if (IS_ERR(ctrl->dma_tx_channel)) { + dev_err(dev, "Failed to request TX dma channel"); + ret = PTR_ERR(ctrl->dma_tx_channel); + ctrl->dma_tx_channel = NULL; + return ret; } size = ((QCOM_SLIM_NGD_DESC_NUM + 1) * SLIM_MSGQ_BUF_LEN); |