]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan()
authorNeil Armstrong <neil.armstrong@linaro.org>
Thu, 15 Jun 2023 12:51:45 +0000 (14:51 +0200)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:19:19 +0000 (17:19 +0200)
BugLink: https://bugs.launchpad.net/bugs/2033931
[ Upstream commit 9d7054fb3ac2e8d252aae1268f20623f244e644f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/spi/spi-geni-qcom.c

index 4e83cc5b445d84697c461a90c17438522f236bb1..dd1581893fe721e01f224a4f001ab40d5d9c4a76 100644 (file)
@@ -595,6 +595,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 dma channel, we can still do the