summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra20-slink.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-12-16 17:02:10 +0300
committerStephen Warren <swarren@nvidia.com>2013-12-16 09:51:58 -0700
commit8a0a1af30cbf56b41220a02e34835022c4d72f41 (patch)
treea9191bb4d68bfa5639415ff5f62f96de3880ee90 /drivers/spi/spi-tegra20-slink.c
parentf1d6ff7939b4444079170adc2bba1f551e7f65ea (diff)
downloadop-kernel-dev-8a0a1af30cbf56b41220a02e34835022c4d72f41.zip
op-kernel-dev-8a0a1af30cbf56b41220a02e34835022c4d72f41.tar.gz
spi: tegra: checking for ERR_PTR instead of NULL
dma_request_slave_channel() returns NULL on error and not ERR_PTRs. I've fixed this by using dma_request_slave_channel_reason() which does return ERR_PTRs. Fixes: a915d150f68d ('spi: tegra: convert to standard DMA DT bindings') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/spi/spi-tegra20-slink.c')
-rw-r--r--drivers/spi/spi-tegra20-slink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index dd6f26c..a728bb8 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -630,8 +630,8 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi,
int ret;
struct dma_slave_config dma_sconfig;
- dma_chan = dma_request_slave_channel(tspi->dev,
- dma_to_memory ? "rx" : "tx");
+ dma_chan = dma_request_slave_channel_reason(tspi->dev,
+ dma_to_memory ? "rx" : "tx");
if (IS_ERR(dma_chan)) {
ret = PTR_ERR(dma_chan);
if (ret != -EPROBE_DEFER)
OpenPOWER on IntegriCloud