Skip to contentSkip to conversation

spi: sprd: Release DMA channel also on probe deferral

PATCH In review Krzysztof Kozlowski 6 participants 18 messages Sep 1, 2020 – Sep 8, 2020

Subsystems (13)
lore
Share & tools
lore
#1 lore raw

PATCH 2/11 spi: sprd: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-sprd-adi.c |  5 +----
 drivers/spi/spi-sprd.c     | 17 +++++------------
 2 files changed, 6 insertions(+), 16 deletions(-)
drivers/spi/spi-sprd-adi.c +1 -4
index 127b8bd25831..392ec5cfa3d6 100644
@@ -504,10 +504,7 @@ static int sprd_adi_probe(struct platform_device *pdev)
 			dev_info(&pdev->dev, "no hardware spinlock supplied\n");
 			break;
 		default:
-			dev_err(&pdev->dev,
-				"failed to find hwlock id, %d\n", ret);
-			fallthrough;
-		case -EPROBE_DEFER:
+			dev_err_probe(&pdev->dev, ret, "failed to find hwlock id\n");
 			goto put_ctlr;
 		}
 	}
drivers/spi/spi-sprd.c +5 -12
index 0443fec3a6ab..635738f54c73 100644
@@ -553,22 +553,15 @@ static int sprd_spi_dma_tx_config(struct sprd_spi *ss, struct spi_transfer *t)
 static int sprd_spi_dma_request(struct sprd_spi *ss)
 {
 	ss->dma.dma_chan[SPRD_SPI_RX] = dma_request_chan(ss->dev, "rx_chn");
-	if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_RX])) {
-		if (PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]) == -EPROBE_DEFER)
-			return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]);
-
-		dev_err(ss->dev, "request RX DMA channel failed!\n");
-		return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]);
-	}
+	if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_RX]))
+		return dev_err_probe(ss->dev, PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]),
+				     "request RX DMA channel failed!\n");
 
 	ss->dma.dma_chan[SPRD_SPI_TX]  = dma_request_chan(ss->dev, "tx_chn");
 	if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_TX])) {
 		dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
-		if (PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]) == -EPROBE_DEFER)
-			return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
-
-		dev_err(ss->dev, "request TX DMA channel failed!\n");
-		return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
+		return dev_err_probe(ss->dev, PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]),
+				     "request TX DMA channel failed!\n");
 	}
 
 	return 0;
Signature · 1 line
2.17.1
#11 lore raw

PATCH 8/11 spi: stm32: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-stm32.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/spi/spi-stm32.c +1 -3
index d4b33b358a31..f0e594b2fee4 100644
@@ -1857,9 +1857,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
 
 	spi->irq = platform_get_irq(pdev, 0);
 	if (spi->irq <= 0) {
-		ret = spi->irq;
-		if (ret != -EPROBE_DEFER)
-			dev_err(&pdev->dev, "failed to get irq: %d\n", ret);
+		ret = dev_err_probe(&pdev->dev, spi->irq, "failed to get irq\n");
 		goto err_master_put;
 	}
 	ret = devm_request_threaded_irq(&pdev->dev, spi->irq,
Signature · 1 line
2.17.1
#0 lore raw

PATCH 1/11 spi: sprd: Release DMA channel also on probe deferral

If dma_request_chan() for TX channel fails with EPROBE_DEFER, the RX channel would not be released and on next re-probe it would be requested second time.

Fixes 386119bc7be9 ("spi: sprd: spi: sprd: Add DMA mode support")
---
 drivers/spi/spi-sprd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-sprd.c +1 -1
index 6678f1cbc566..0443fec3a6ab 100644
@@ -563,11 +563,11 @@ static int sprd_spi_dma_request(struct sprd_spi *ss)
 
 	ss->dma.dma_chan[SPRD_SPI_TX]  = dma_request_chan(ss->dev, "tx_chn");
 	if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_TX])) {
+		dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
 		if (PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]) == -EPROBE_DEFER)
 			return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
 
 		dev_err(ss->dev, "request TX DMA channel failed!\n");
-		dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
 		return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
 	}
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

PATCH 3/11 spi: atmel: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-atmel.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-atmel.c +2 -3
index 2cfe6253a784..7c68d5cdbdc6 100644
@@ -513,9 +513,8 @@ static int atmel_spi_configure_dma(struct spi_master *master,
 
 	master->dma_tx = dma_request_chan(dev, "tx");
 	if (IS_ERR(master->dma_tx)) {
-		err = PTR_ERR(master->dma_tx);
-		if (err != -EPROBE_DEFER)
-			dev_err(dev, "No TX DMA channel, DMA is disabled\n");
+		err = dev_err_probe(dev, PTR_ERR(master->dma_tx),
+				    "No TX DMA channel, DMA is disabled\n");
 		goto error_clear;
 	}
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#6 lore raw

PATCH 4/11 spi: bcm2835: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-bcm2835.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/spi/spi-bcm2835.c +2 -5
index c45d76c848c8..5519f1eda238 100644
@@ -1319,11 +1319,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
 
 	bs->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(bs->clk)) {
-		err = PTR_ERR(bs->clk);
-		if (err == -EPROBE_DEFER)
-			dev_dbg(&pdev->dev, "could not get clk: %d\n", err);
-		else
-			dev_err(&pdev->dev, "could not get clk: %d\n", err);
+		err = dev_err_probe(&pdev->dev, PTR_ERR(bs->clk),
+				    "could not get clk\n");
 		goto out_controller_put;
 	}
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#8 lore raw

PATCH 5/11 spi: cadence-quadspi: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-cadence-quadspi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/spi/spi-cadence-quadspi.c +1 -4
index 508b219eabf8..cec4e89ab9b2 100644
@@ -1117,11 +1117,8 @@ static int cqspi_request_mmap_dma(struct cqspi_st *cqspi)
 	cqspi->rx_chan = dma_request_chan_by_mask(&mask);
 	if (IS_ERR(cqspi->rx_chan)) {
 		int ret = PTR_ERR(cqspi->rx_chan);
-
-		if (ret != -EPROBE_DEFER)
-			dev_err(&cqspi->pdev->dev, "No Rx DMA available\n");
 		cqspi->rx_chan = NULL;
-		return ret;
+		return dev_err_probe(&cqspi->pdev->dev, ret, "No Rx DMA available\n");
 	}
 	init_completion(&cqspi->rx_dma_complete);
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#9 lore raw

PATCH 6/11 spi: spi-mux: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-mux.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-mux.c +2 -3
index cc9ef371db14..37dfc6e82804 100644
@@ -139,9 +139,8 @@ static int spi_mux_probe(struct spi_device *spi)
 
 	priv->mux = devm_mux_control_get(&spi->dev, NULL);
 	if (IS_ERR(priv->mux)) {
-		ret = PTR_ERR(priv->mux);
-		if (ret != -EPROBE_DEFER)
-			dev_err(&spi->dev, "failed to get control-mux\n");
+		ret = dev_err_probe(&spi->dev, PTR_ERR(priv->mux),
+				    "failed to get control-mux\n");
 		goto err_put_ctlr;
 	}
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#10 lore raw

PATCH 7/11 spi: qcom-qspi: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-qcom-qspi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-qcom-qspi.c +2 -3
index b8857a97f40a..f83755e292bb 100644
@@ -495,9 +495,8 @@ static int qcom_qspi_probe(struct platform_device *pdev)
 
 	ctrl->icc_path_cpu_to_qspi = devm_of_icc_get(dev, "qspi-config");
 	if (IS_ERR(ctrl->icc_path_cpu_to_qspi)) {
-		ret = PTR_ERR(ctrl->icc_path_cpu_to_qspi);
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "Failed to get cpu path: %d\n", ret);
+		ret = dev_err_probe(dev, PTR_ERR(ctrl->icc_path_cpu_to_qspi),
+				    "Failed to get cpu path\n");
 		goto exit_probe_master_put;
 	}
 	/* Set BW vote for register access */
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#13 lore raw

PATCH 9/11 spi: synquacer: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-synquacer.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-synquacer.c +2 -3
index ae17c99cce03..42e82dbe3d41 100644
@@ -640,9 +640,8 @@ static int synquacer_spi_probe(struct platform_device *pdev)
 		}
 
 		if (IS_ERR(sspi->clk)) {
-			if (!(PTR_ERR(sspi->clk) == -EPROBE_DEFER))
-				dev_err(&pdev->dev, "clock not found\n");
-			ret = PTR_ERR(sspi->clk);
+			ret = dev_err_probe(&pdev->dev, PTR_ERR(sspi->clk),
+					    "clock not found\n");
 			goto put_spi;
 		}
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#14 lore raw

PATCH 10/11 spi: tegra114: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-tegra114.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/spi/spi-tegra114.c +3 -8
index c2c58871a947..ca6886aaa519 100644
@@ -664,16 +664,11 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi,
 	struct dma_chan *dma_chan;
 	u32 *dma_buf;
 	dma_addr_t dma_phys;
-	int ret;
 
 	dma_chan = dma_request_chan(tspi->dev, dma_to_memory ? "rx" : "tx");
-	if (IS_ERR(dma_chan)) {
-		ret = PTR_ERR(dma_chan);
-		if (ret != -EPROBE_DEFER)
-			dev_err(tspi->dev,
-				"Dma channel is not available: %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(dma_chan))
+		return dev_err_probe(tspi->dev, PTR_ERR(dma_chan),
+				     "Dma channel is not available\n");
 
 	dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size,
 				&dma_phys, GFP_KERNEL);
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#15 lore raw

PATCH 11/11 spi: tegra20: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

---
 drivers/spi/spi-tegra20-slink.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/spi/spi-tegra20-slink.c +3 -7
index a07b72e9c344..a0810765d4e5 100644
@@ -600,13 +600,9 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi,
 	struct dma_slave_config dma_sconfig;
 
 	dma_chan = dma_request_chan(tspi->dev, dma_to_memory ? "rx" : "tx");
-	if (IS_ERR(dma_chan)) {
-		ret = PTR_ERR(dma_chan);
-		if (ret != -EPROBE_DEFER)
-			dev_err(tspi->dev,
-				"Dma channel is not available: %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(dma_chan))
+		return dev_err_probe(tspi->dev, PTR_ERR(dma_chan),
+				     "Dma channel is not available\n");
 
 	dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size,
 				&dma_phys, GFP_KERNEL);
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v1 3/11
#5 lore raw

Re: [PATCH 03/11] spi: atmel: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski
Quoted 4 lines · Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

Quoted 23 lines
---
 drivers/spi/spi-atmel.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/spi/spi-atmel.c +2 -3
index 2cfe6253a784..7c68d5cdbdc6 100644
@@ -513,9 +513,8 @@ static int atmel_spi_configure_dma(struct spi_master *master,
 
 	master->dma_tx = dma_request_chan(dev, "tx");
 	if (IS_ERR(master->dma_tx)) {
-		err = PTR_ERR(master->dma_tx);
-		if (err != -EPROBE_DEFER)
-			dev_err(dev, "No TX DMA channel, DMA is disabled\n");
+		err = dev_err_probe(dev, PTR_ERR(master->dma_tx),
+				    "No TX DMA channel, DMA is disabled\n");
 		goto error_clear;
 	}
 
Signature · 1 line
2.17.1
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
reviewer Acked-by on v1 1/11
#16 lore raw
In reply to Krzysztof Kozlowski
Quoted 8 lines · Krzysztof Kozlowski

If dma_request_chan() for TX channel fails with EPROBE_DEFER, the RX channel would not be released and on next re-probe it would be requested second time.

Fixes 386119bc7be9 ("spi: sprd: spi: sprd: Add DMA mode support")

Thanks,
Chunyan

Quoted 24 lines
---
 drivers/spi/spi-sprd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-sprd.c +1 -2
index 6678f1cbc566..0443fec3a6ab 100644
@@ -563,11 +563,11 @@ static int sprd_spi_dma_request(struct sprd_spi *ss)
 
        ss->dma.dma_chan[SPRD_SPI_TX]  = dma_request_chan(ss->dev, "tx_chn");
        if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_TX])) {
+               dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
                if (PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]) == -EPROBE_DEFER)
                        return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
 
                dev_err(ss->dev, "request TX DMA channel failed!\n");
-               dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
                return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
        }
 
--

2.17.1

reviewer Acked-by on v1 2/11
#2 lore raw

Re: [PATCH 02/11] spi: sprd: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski
Quoted 5 lines · Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

Thanks,
Chunyan

Quoted 56 lines
---
 drivers/spi/spi-sprd-adi.c |  5 +----
 drivers/spi/spi-sprd.c     | 17 +++++------------
 2 files changed, 6 insertions(+), 16 deletions(-)
drivers/spi/spi-sprd-adi.c +1 -4
index 127b8bd25831..392ec5cfa3d6 100644
@@ -504,10 +504,7 @@ static int sprd_adi_probe(struct platform_device *pdev)
                        dev_info(&pdev->dev, "no hardware spinlock supplied\n");
                        break;
                default:
-                       dev_err(&pdev->dev,
-                               "failed to find hwlock id, %d\n", ret);
-                       fallthrough;
-               case -EPROBE_DEFER:
+                       dev_err_probe(&pdev->dev, ret, "failed to find hwlock id\n");
                        goto put_ctlr;
                }
        }
drivers/spi/spi-sprd.c +5 -13
index 0443fec3a6ab..635738f54c73 100644
@@ -553,22 +553,15 @@ static int sprd_spi_dma_tx_config(struct sprd_spi *ss, struct spi_transfer *t)
 static int sprd_spi_dma_request(struct sprd_spi *ss)
 {
        ss->dma.dma_chan[SPRD_SPI_RX] = dma_request_chan(ss->dev, "rx_chn");
-       if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_RX])) {
-               if (PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]) == -EPROBE_DEFER)
-                       return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]);
-
-               dev_err(ss->dev, "request RX DMA channel failed!\n");
-               return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]);
-       }
+       if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_RX]))
+               return dev_err_probe(ss->dev, PTR_ERR(ss->dma.dma_chan[SPRD_SPI_RX]),
+                                    "request RX DMA channel failed!\n");
 
        ss->dma.dma_chan[SPRD_SPI_TX]  = dma_request_chan(ss->dev, "tx_chn");
        if (IS_ERR_OR_NULL(ss->dma.dma_chan[SPRD_SPI_TX])) {
                dma_release_channel(ss->dma.dma_chan[SPRD_SPI_RX]);
-               if (PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]) == -EPROBE_DEFER)
-                       return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
-
-               dev_err(ss->dev, "request TX DMA channel failed!\n");
-               return PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]);
+               return dev_err_probe(ss->dev, PTR_ERR(ss->dma.dma_chan[SPRD_SPI_TX]),
+                                    "request TX DMA channel failed!\n");
        }
 
        return 0;
--

2.17.1

maintainer
#3 lore raw

Re: [PATCH 02/11] spi: sprd: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski
Quoted 2 lines · Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

This doesn't apply against current code, please check and resend.

Applying: spi: sprd: Simplify with dev_err_probe() Using index info to reconstruct a base tree...
M drivers/spi/spi-sprd-adi.c
Falling back to patching base and 3-way merge... Auto-merging drivers/spi/spi-sprd-adi.c
CONFLICT (content): Merge conflict in drivers/spi/spi-sprd-adi.c

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Reviewed-by on v1 8/11
#12 lore raw

Re: [PATCH 08/11] spi: stm32: Simplify with dev_err_probe()

In reply to Krzysztof Kozlowski
Quoted 4 lines · Krzysztof Kozlowski

Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed.

Quoted 22 lines
---
 drivers/spi/spi-stm32.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/spi/spi-stm32.c +1 -3
index d4b33b358a31..f0e594b2fee4 100644
@@ -1857,9 +1857,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
 
 	spi->irq = platform_get_irq(pdev, 0);
 	if (spi->irq <= 0) {
-		ret = spi->irq;
-		if (ret != -EPROBE_DEFER)
-			dev_err(&pdev->dev, "failed to get irq: %d\n", ret);
+		ret = dev_err_probe(&pdev->dev, spi->irq, "failed to get irq\n");
 		goto err_master_put;
 	}
 	ret = devm_request_threaded_irq(&pdev->dev, spi->irq,
Signature · 1 line
2.17.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#17 lore raw
In reply to Krzysztof Kozlowski
Quoted 3 lines · Krzysztof Kozlowski

If dma_request_chan() for TX channel fails with EPROBE_DEFER, the RX channel would not be released and on next re-probe it would be requested second time.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[01/11] spi: sprd: Release DMA channel also on probe deferral

        commit: 687a2e76186dcfa42f22c14b655c3fb159839e79
[02/11] spi: sprd: Simplify with dev_err_probe()
        (no commit info)
[03/11] spi: atmel: Simplify with dev_err_probe()
        commit: 96189475820835d7176171492640a58c600aca42
[04/11] spi: bcm2835: Simplify with dev_err_probe()
        commit: 65acd82c4eb7f08747922ed3afb2d099a1b25d3f
[05/11] spi: cadence-quadspi: Simplify with dev_err_probe()
        commit: 436a5c208037a71f64f35312969e27a05d6d7c53
[06/11] spi: spi-mux: Simplify with dev_err_probe()
        commit: 2d9bdf645584d15ed1d4aae6204cb6ea8b673d48
[07/11] spi: qcom-qspi: Simplify with dev_err_probe()
        commit: 034532681c56cfffaea169a59155fe11e9172d9c
[08/11] spi: stm32: Simplify with dev_err_probe()
        commit: a05cec2dc2df1e5d25addb7aba398f3eb451e163
[09/11] spi: synquacer: Simplify with dev_err_probe()
        commit: 74ee6dc1257edf5fcfba67fd8075b766d11c42a0
[10/11] spi: tegra114: Simplify with dev_err_probe()
        commit: 68fffc191ed19ea5618285b128e6048d1536e680
[11/11] spi: tegra20: Simplify with dev_err_probe()
        commit: 7708aff1e2ebc8fdccdd61cf9ab8576a66989166

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark