summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorNeil Armstrong <neil.armstrong@linaro.org>2023-06-15 15:51:45 +0300
committerMark Brown <broonie@kernel.org>2023-06-19 14:59:48 +0300
commit337207408f74a8374beacf232ec1e08742c1d98f (patch)
tree9c91dbf45bec9564eeeb34c8ae34f477b3c38ba6 /drivers/spi
parente6afe03351ac81fbc4f2b93bf3b356f7b662939d (diff)
downloadlinux-337207408f74a8374beacf232ec1e08742c1d98f.tar.xz
spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan()
Now spi_geni_grab_gpi_chan() errors are correctly reported, the -EPROBE_DEFER error should be returned from probe in case the GPI dma driver is built as module and/or not probed yet. Fixes: b59c122484ec ("spi: spi-geni-qcom: Add support for GPI dma") Fixes: 6532582c353f ("spi: spi-geni-qcom: fix error handling in spi_geni_grab_gpi_chan()") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230615-topic-sm8550-upstream-fix-spi-geni-qcom-probe-v2-1-670c3d9e8c9c@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-geni-qcom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index e423efcf016f..08672a961fbb 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -646,6 +646,8 @@ static int spi_geni_init(struct spi_geni_master *mas)
geni_se_select_mode(se, GENI_GPI_DMA);
dev_dbg(mas->dev, "Using GPI DMA mode for SPI\n");
break;
+ } else if (ret == -EPROBE_DEFER) {
+ goto out_pm;
}
/*
* in case of failure to get gpi dma channel, we can still do the