Skip to contentSkip to conversation

mxs/spi: Fix misuse of init_completion

PATCH Superseded Marek Vasut 4 participants 4 messages Aug 22, 2012 – Sep 5, 2012

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mxs/spi: Fix misuse of init_completion

Cc Chris Ball <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Mark Brown <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 drivers/spi/spi-mxs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-mxs.c +3 -1
index 331f600..c965cc6 100644
@@ -230,7 +230,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs,
 		return -EINVAL;
 	}
 
-	init_completion(&spi->c);
+	INIT_COMPLETION(spi->c);
 
 	if (*first)
 		pio |= BM_SSP_CTRL0_LOCK_CS;
@@ -560,6 +560,8 @@ static int __devinit mxs_spi_probe(struct platform_device *pdev)
 	ssp->devid = devid;
 	ssp->dma_channel = dma_channel;
 
+	init_completion(&spi->c);
+
 	ret = devm_request_irq(&pdev->dev, irq_err, mxs_ssp_irq_handler, 0,
 			       DRIVER_NAME, ssp);
 	if (ret)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 mxs/spi: Fix misuse of init_completion

Hi,

Quoted 23 lines · Marek Vasut
Cc Chris Ball <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Mark Brown <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 drivers/spi/spi-mxs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-mxs.c +1 -1
index 331f600..c965cc6 100644
@@ -230,7 +230,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs,
 		return -EINVAL;
 	}
 
-	init_completion(&spi->c);
+	INIT_COMPLETION(spi->c);
 
 	if (*first)
 		pio |= BM_SSP_CTRL0_LOCK_CS;

drivers/spi/spi-mxs.c static int __devinit mxs_spi_probe(struct platform_device *pdev) · line 567

Quoted 8 lines
drivers/spi/spi-mxs.c +2 -0
@@ -560,6 +560,8 @@ static int __devinit mxs_spi_probe(struct platform_device *pdev)
 	ssp->devid = devid;
 	ssp->dma_channel = dma_channel;
 
+	init_completion(&spi->c);
+
 	ret = devm_request_irq(&pdev->dev, irq_err, mxs_ssp_irq_handler, 0,
 			       DRIVER_NAME, ssp);
 	if (ret)

Please be more specific with commit messages -- is there an observed symptom that this fixes? Does the patch need to go to stable@, too?

Thanks,

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#2 lore raw

PATCH 1/1 mxs/spi: Fix misuse of init_completion

Dear Chris Ball,

Quoted 40 lines

Hi,

Quoted 37 lines · Marek Vasut
Cc Chris Ball <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Mark Brown <[email protected]>
Cc Fabio Estevam <[email protected]>

---

 drivers/spi/spi-mxs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-mxs.c +1 -1
index 331f600..c965cc6 100644
@@ -230,7 +230,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int
 cs,
 
 		return -EINVAL;
 
 	}
 
-	init_completion(&spi->c);
+	INIT_COMPLETION(spi->c);
drivers/spi/spi-mxs.c +2 -0
 	if (*first)
 
 		pio |= BM_SSP_CTRL0_LOCK_CS;
@@ -560,6 +560,8 @@ static int __devinit mxs_spi_probe(struct
 platform_device *pdev)
 
 	ssp->devid = devid;
 	ssp->dma_channel = dma_channel;
 
+	init_completion(&spi->c);
+
 
Quoted 7 lines

drivers/spi/spi-mxs.c static int __devinit mxs_spi_probe(struct platform_device *pdev) · line 567

Quoted 5 lines
drivers/spi/spi-mxs.c +0 -0
 	ret = devm_request_irq(&pdev->dev, irq_err, mxs_ssp_irq_handler, 0,
 
 			       DRIVER_NAME, ssp);
 
 	if (ret)

Please be more specific with commit messages

I kind of expected this change was pretty obvious.

Quoted 1 line

is there an observed symptom that this fixes?

None. I noticed this misuse, so I fixed it.

Quoted 1 line

Does the patch need to go to stable@, too?

No, this driver is in -next currently.

Quoted 3 lines

Thanks,

- Chris.

Best regards,
Marek Vasut